home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.barnyard.co.uk
/
2015.02.ftp.barnyard.co.uk.tar
/
ftp.barnyard.co.uk
/
cpm
/
walnut-creek-CDROM
/
ZSYS
/
SIMTEL20
/
ZCPR3
/
CMDFILES.HLP
< prev
next >
Wrap
Text File
|
2000-06-30
|
25KB
|
729 lines
;
Command File Processing
-- Basics --
0 - Overview
1 - Restrictions
2 - Extended Cmd Procs
-- Disk-Based Command Files -- -- Memory-Based Command Files --
S - The SUB Utility Z - The ZEX Utility
E - SUB Error Messages D - ZEX Directives
G - GOTO Command
:0
Overview of Command Files
┴á CommanΣá Filσ i≤ ß filσá containinτá commands¼á witΦ ì
optiona∞á paramete≥ substitution¼á whicΦ caε bσ executeΣá b∙ ì
ZCPR3«á Thesσá command≤á arσá exactl∙á thσá samσá kind≤á oµ ì
command≤ a≤ yo⌡ woulΣ issuσ a⌠ thσ console¼á anΣ an∙ commanΣ ì
whicΦ caε bσ issueΣ froφ thσ consolσ caε als∩ bσ issueΣ froφ ì
withiε ß CommanΣ Filσ (witΦ jus⌠ ß couplσ oµ restrictions).
Thσáá CommanΣá Filσá Facilitie≤á oµá SU┬á anΣá ZE╪á arσ ì
availablσá unde≥ ZCPR3«á Simila≥ iε concep⌠ t∩á thσá SUBMI╘ ì
facilit∙ oµ CP/M¼á botΦ SU┬ anΣ ZE╪ arσ upward-compatablσ t∩ ì
SUBMI╘áá (an∙áá SU┬á filσá caεá ruεá unde≥á theφá witΦáá fe≈ ì
restrictions).
BotΦá SU┬ anΣ ZE╪ begiε processinτ b∙á translatinτá thσ ì
commanΣá file≤ the∙ arσ giveε int∩ slightl∙ differen⌠ forms« ì
BotΦ d∩ paramete≥ substitution¼á extractinτ parameter≤á froφ ì
thσá commanΣá line≤á anΣ placinτ theφ int∩ thσ tex⌠á oµá thσ ì
commanΣá streaφ the∙ arσ building«á SU┬ build≤ thσá commanΣ ì
streaφ t∩ bσ executeΣ oε disδ drivσ ┴ unde≥ thσ curren⌠ use≥ ì
number¼ anΣ ZE╪ build≤ thσ commanΣ streaφ iε memory.
ZE╪á i≤ generall∙ preferreΣ t∩á SUB«á Unde≥á ZEX¼á thσ ì
commanΣá streaφ i≤ executeΣ mucΦ morσ quickl∙ thaε unde≥ SU┬ ì
sincσ ZE╪ accesse≤ memor∙ fo≥ thσ nex⌠ characte≥ whilσ ZCPR│ ì
ha≤ t∩ g∩ t∩ disk« ZEX¼ however¼ take≤ u≡ memor∙ space¼ anΣ ì
tha⌠ i≤ it≤ maiε drawback« Thσ TP┴ (Transien⌠ Prograφ Area⌐ ì
unde≥ ZE╪ i≤ smalle≥ thaε wha⌠ i≤ availablσ t∩ commanΣ file≤ ì
runninτ unde≥ SUB«á Thi≤ i≤ thσ basiπ trade-ofµ betweeε thσ ì
tw∩ CommanΣ Filσ Processors.
Anothe≥á differencσá betweeε SU┬ anΣ ZE╪á i≤á tha⌠á SU┬ ì
commanΣá stream≤á arσá line-orienteΣ anΣ extracteΣá onl∙á b∙ ì
ZCPR3«á Tha⌠á is¼á SU┬ build≤ ß commanΣ filσ nameΣá $$$.SU┬ ì
likσ SUBMI╘ does¼ anΣ ZCPR│ extract≤ ß linσ froφ thσ $$$.SU┬ ì
filσá eacΦá timσ i⌠ i≤ entered«á Wheε ZCPR│ i≤á entereΣá b∙ ì
eithe≥á ßá ColΣ Boot¼á Warφ Boot¼á o≥ simplσ RETurεá froφá ß ì
loadeΣ program¼á i⌠ check≤ thσ Multiplσ CommanΣ Linσá Buffe≥ ì
fo≥á ß pendinτ command«á Iµ ZCPR│ find≤ ß pendinτá command¼ ì
thσ commanΣ i≤ executed«á Iµ not¼ ZCPR│ check≤ thσ A║ drivσ ì
(curren⌠á user⌐á fo≥ ß $$$.SU┬ file«á Iµ ß $$$.SU┬ filσá i≤ ì
found¼á ZCPR│ extract≤ thσ nex⌠ linσ froφ thσ $$$.SU┬á file¼ ì
processe≤á it¼á anΣ begin≤ executioε oµ i⌠ froφ thσ Multiplσ ì
CommanΣ Linσ Buffer«á Finally¼á iµ thσ $$$.SU┬ filσ i≤á no⌠ ì
found¼ ZCPR│ prompt≤ thσ use≥ fo≥ input.
Tha⌠á i≤á ho≈á commanΣ streaφ processinτ unde≥á SU┬á i≤ ì
performed«á ZEX¼á however¼ act≤ a≤ ß combinatioε oµ SU┬ anΣ ì
XSUB«á Oncσ commanΣ streaφ processinτ begin≤ unde≥ ZEX¼ thσ ì
ZE╪ monitor¼ locateΣ unde≥ ZCPR│ witΦ thσ associateΣ commanΣ ì
stream¼á supplie≤á ßá characte≥ eacΦ timσ thσá BIO╙á Consolσ ì
Inpu⌠á Routinσ i≤ called«á ZE╪ extract≤ thσ nex⌠á characte≥ ì
froφ thσ commanΣ stream¼á examine≤ i⌠ t∩ seσ iµ i⌠ i≤ ßá ZE╪ ì
commanΣ anΣ execute≤ i⌠ iµ so¼ anΣ return≤ i⌠ t∩ thσ callinτ ì
prograφ iµ i⌠ i≤ no⌠ ß ZE╪ command.
Iε ß sense¼á ZCPR│ itselµ doe≤ no⌠ realizσ tha⌠ ZE╪á i≤ ì
running« Neithe≥ d∩ thσ transien⌠ program≤ iε general« ZE╪ ì
simpl∙á intercept≤ al∞ call≤ t∩ thσ BIO╙ Consolσ Inpu⌠á (anΣ ì
Inpu⌠ Status⌐ routinσ anΣ provide≤ aε inpu⌠ characte≥ iε it≤ ì
place«á Therσ arσ exception≤ t∩ thi≤ case¼ bu⌠ the∙ wil∞ bσ ì
discusseΣ later.
BotΦ SU┬ anΣ ZE╪ fi⌠ int∩ thσ ZCPR│ Systeφ nicely¼á anΣ ì
the∙á caεá bσ useΣ t∩ ac⌠ a≤ ExtendeΣ CommanΣ Processor≤á iµ ì
desired« Thi≤ i≤ discusseΣ later.
:G
Command: GOTO 1.0
Syntax:
GOTO label
;=label any_text
Function:
GOT╧ i≤ ß ZCPR│ utility¼ designeΣ t∩ bσ ruε froφ withiε ì
ßá ZE╪ commanΣ file¼á whicΦ permit≤ branching«á I⌠á accept≤ ì
onl∙ onσ argument¼á ß label¼ whicΦ i≤ defineΣ withiε thσ ZE╪ ì
filσ a≤ ß specia∞ commen⌠ oµ thσ form:
;=label
An∙á tex⌠ whicΦ follow≤ thσ "labeló phrasσ i≤ considereΣá t∩ ì
be comment and is not processed.
Options:
None
Comments:
GOT╧ wil∞ ONL┘ worδ correctl∙ iµ executeΣ withiε ßá ZE╪ ì
command file. GOTO will issue an error message otherwise.
Withou⌠ thσ ZCPR│ Flo≈ Contro∞ facility¼á GOT╧ woulΣ bσ ì
oµ littlσ value« WitΦ IF¼ however¼ GOT╧ i≤ extremel∙ usefu∞ ì
in setting up loops and other flow-control constructs.
Selected Error Messages:
"ZE╪á No⌠á Runningó mean≤ tha⌠ GOT╧ wa≤á executeΣá froφ ì
outside a ZEX command file.
"Labe∞á xx°á No⌠ FounΣ -- Abortinτ ZEXó mean≤ tha⌠á thσ ì
referenceΣ labe∞ wa≤ no⌠ founΣ withiε thσ commanΣá file¼á s∩ ì
ZEX execution is terminated.
Examples of Use:
ZEX Command File 1:
REG S1 0;note Register 1 = 0
;=start
XIF;note Exit all pending IFs
ECHO Hello, World
IF ~1 3;note IF Register 1 <> 3
GOTO START
FI
ZEX Command File 2:
M80 =$1;note Assemble File
; Strike ^C if Errors Exist - ^?
if ~nul $3;note IF there are 2 libs ...
L80 $1/N,$1,$2/S,$3/S,SYSLIB/S,/U/E;note link all
goto done
fi
if ~nul $2;note IF there is a 2nd arg ...
L8░ $1/N,$1,$2/S,SYSLIB/S,/U/E;notσ linδ liΓ $2
else;note IF there is no 2nd arg ...
L80 $1/N,$1,SYSLIB/S,/U/E;note link
;=done
fi
ZEX Command File 3:
if NEC=$2
echo Terminal is NEC
goto done
fi
if TTY=$2
echo Terminal is TTY
goto done
fi
if DIABLO=$2
echo Terminal is Diablo
else
echo Terminal is Undefined
fi
;=done
xif;note Exit all pending IFs
ws $1;note Edit file
:S
Command: SUB 3.0
Syntax:
SUB or SUB // <-- Print Help Message
SUB /A Text <-- Abort $$$.SUB File
Processing at User's
Discretion
SUB /AB Text <-- Same as /A but Ring Bell
to Alert User
SUB /I <-- Enter Interactive Input
Mode
SUB filename params <-- As in Standard SUBMIT
Function:
SU┬ build≤ ß commanΣ filσ oε disδ (nameΣ $$$.SUB⌐ whicΦ ì
ZCPR│á look≤á fo≥ eacΦ timσ i⌠ i≤ read∙ fo≥ ß commanΣá line« ì
Iµá ZCPR│ find≤ sucΦ ß file¼á i⌠ extract≤ thσá nex⌠á commanΣ ì
from this file.
SUB can also be used to sound alarms to the user.
Options:
As indicated above:
A - Permit abort
AB - Permit Abort and Ring Bell
I - Interactive Input
Comments:
Thσá "SU┬á /Aó anΣ "SU┬ /ABó form≤ allo≈á thσá use≥á t∩ ì
gracefull∙á abor⌠ ß $$$.SU┬ file«á ^├ a⌠ thσ consolσ caε bσ ì
useΣ t∩ abor⌠ sucΦ processinτ a≤ unde≥ CP/M¼ bu⌠ thσ /┴ forφ ì
allow≤ thσ luxur∙ oµ startinτ ß commanΣ streaφ anΣá stoppinτ ì
a⌠á ßá critica∞á poin⌠ t∩ allo≈ thσ use≥ t∩ takσá hi≤á time¼ ì
inspec⌠á wha⌠á ha≤á happened¼á anΣ theεá decidσá whethe≥á t∩ ì
proceeΣ o≥ not.
Thσá "SU┬ /Ió forφ eliminate≤ thσ neeΣ fo≥ thσ use≥á t∩ ì
usσá aεá edito≥ t∩ creatσ ß .SU┬ file«á Iµ thσ use≥á ha≤á ß ì
commanΣá streaφ hσ want≤ t∩ executσ immediatel∙ anΣá doesn'⌠ ì
carσ t∩ d∩ i⌠ again¼á hσ caε usσ thi≤ option«á Iε response¼ ì
SU┬á allow≤á hiφá t∩ ente≥ hi≤á commanΣá streaφá (sorry¼á n∩ ì
paramete≥ passing⌐ ß linσ a⌠ ß time« Wheε i⌠ i≤ al∞ entereΣ ì
(use≥ enter≤ aε empt∙ line)¼á thσ $$$.SU┬ filσ i≤ buil⌠á anΣ ì
executed.
Thσ fina∞ form¼á "SU┬ filenamσ params"¼ i≤ identica∞ iε ì
forφá t∩á thσá SUBMI╘á commanΣá supplieΣá witΦá CP/M«áá Thσ ì
"filenameóá specifie≤á thσá namσá oµ thσá .SU┬á filσá t∩á bσ ì
executed¼áá anΣá thσá parameter≤á arσá associateΣá witΦá thσ ì
substitutioε variable≤ oµ $1¼á $2¼ etc« U≡ t∩ 2░ parameter≤ ì
ma∙ bσ specified«á Thσ sequencσ "$$ó place≤ ß "$ó int∩á thσ ì
commanΣá line¼á anΣá thσ characte≥ sequencσ "^có place≤á thσ ì
indicateΣ contro∞ characte≥ int∩ thσ commanΣ linσ (uparro≈ ├ ì
place≤ Control-C).
Thσ SU┬ commanΣ ma∙ bσ nesteΣ int∩ ß $$$.SU┬ file«á Iµ ì
ß "SU┬ filenamσ paramsó commanΣ i≤ encountereΣ iε ßá $$$.SU┬ ì
file¼ SU┬ runs¼ realize≤ tha⌠ thi≤ ha≤ happened¼ anΣ insert≤ ì
thσá indicateΣá commanΣ file¼á witΦ paramete≥á substitution¼ ì
int∩á thσ runninτ commanΣ streaφ a⌠ thσá appropriatσá place« ì
Thi≤ ma∙ bσ nesteΣ a≤ man∙ level≤ dee≡ a≤ desired.
Unde≥á ZCPR3¼á iµá SU┬á i≤ executeΣ witΦá thσá Multiplσ ì
CommanΣá Linσ Facilit∙ invokeΣ anΣ morσ command≤ follo≈á thσ ì
SU┬ command¼á theε thσ res⌠ oµ thσ Multiplσ CommanΣ Linσá i≤ ì
inserteΣ a⌠ thσ enΣ oµ thσ generateΣ $$$.SU┬ file.
Finally¼á SU┬ follow≤ thσ ZCPR│ patΦ wheε searchinτ fo≥ ì
thσ indicateΣ commanΣ file« I⌠ i≤ full∙ integrateΣ int∩ thσ ì
ZCPR│á Systeφá anΣ i≤ ablσ t∩ emplo∙ thσ Externa∞á PatΦá anΣ ì
Multiplσ CommanΣ Linσ Buffe≥ feature≤ oµ ZCPR3.
Selected Error Messages:
"Paramó erro≥ mean≤ tha⌠ ß paramete≥ wa≤ referenceΣ anΣ ì
nonσ wa≤ giveε oε thσ commanΣ line.
"Linσ To∩ Longó mean≤ tha⌠ thσ inpu⌠ line¼á afte≥ beinτ ì
expandeΣá witΦá thσá inpu⌠ parameters¼á wa≤á morσá thaεá 12╢ ì
characters long.
┴á morσ completσ lis⌠ oµ erro≥ message≤ i≤ giveεá unde≥ ì
the indicated section of the main menu.
Examples of Use:
SUB cmdfile p1 p2 p3
-- thσááá filσáá 'cmdfile.SUBºááá i≤ááá processed¼ ì
substituting 'p1' for $1, 'p2' for $2, and 'p3' for $3
SUB /AB
-- durinτá thσ executioε oµ ß commanΣá file¼á thi≤ ì
commanΣá cause≤ thσ bel∞ t∩ rinτ a⌠ thσ consolσ anΣ thσ use≥ ì
is given a chance to abort execution
:E
SU┬ provide≤ ß numbe≥ oµ informativσ diagnostic≤ t∩ thσ ì
user«á Iε particular¼á wheε processinτ ß CommanΣ File¼ wheε ì
aεá erro≥ i≤ encountered¼á thσ use≥ i≤ informeΣ oµ thσá linσ ì
numbe≥ thσ erro≥ occur≤ at.
Thσá followinτ summarize≤ thσ erro≥ message≤á presenteΣ ì
b∙ SUB:
Disk Full
There is no room to write the $$$.SUB file
Directory Full
There is no directory space for the $$$.SUB file
Memory Full
There is not enough memory in which to build the
command stream to be placed into the $$$.SUB file
SUB Error Messages, Con't
SUBMIT File Not Found
The .SUB file specified in the command line could
not be found along the ZCPR3 path
Parameter
Invalid Parameter Specified
Too Many Parameters
More than 20 parameters were on the command line
Line too Long
The current line in the command stream exceeds
128 bytes
SUBMIT File Empty
The .SUB file specified in the command line was
found to be empty
SUB Error Messages, Con't
Control Character
The ^c form was not followed by a letter A-Z
:Z
Command: ZEX 3.0
Syntax:
ZEX // <-- Print Help
ZEX <-- Enter Interactive Mode
ZEX filename params <-- Process .ZEX or .SUB
file as with SUBMIT
Function:
ZE╪á i≤á ßá memory-baseΣ commanΣá filσá processor«á I⌠ ì
perform≤ function≤ likσ SU┬ anΣ XSU┬ combined¼ anΣ it≤ inpu⌠ ì
sourcσ i≤ locateΣ iε memory¼á s∩ tha⌠ it≤ executioε speeΣ i≤ ì
significantly greater.
Options:
A≤ indicateΣ above¼ therσ arσ n∩ option≤ t∩ ZEX.
Comments:
Thσáá Interactivσáá Modσá oµá ZE╪á execute≤á likσáá thσ ì
Interactivσá Modσá oµ SUB«á Thσ use≥ enter≤á commanΣá line≤ ì
unti∞á hσá i≤ satisfieΣ anΣ theε terminate≤ thσá proces≤á b∙ ì
enterinτá aε empt∙ linσ (simpl∙ hittinτ RETURN)«á ZE╪á theε ì
execute≤ thσ command≤ iε thσ sequencσ entered« N∩ paramete≥ ì
passinτ i≤ permitteΣ iε thi≤ modσ oµ operation.
Thσáá "ZE╪áá filenamσáá paramsóá forφáá i≤áá likσáá thσ ì
correspondinτá SU┬ form«á ZE╪ wil∞ searcΦ alonτá thσá ZCPR│ ì
Externa∞ PatΦ fo≥ ß commanΣ filσ oµ thσ forφ filename.ZE╪ o≥ ì
filename.SUB« Iµ ß director∙ i≤ entereΣ whicΦ contain≤ botΦ ì
sucΦ files¼ thσ filσ oµ typσ ZE╪ wil∞ bσ executed.
Oncσá ZE╪ ha≤ beguε execution¼á i⌠ place≤ ß ZE╪ Monito≥ ì
jus⌠á unde≥á ZCPR│ anΣ build≤ thσ commanΣ streaφá unde≥á thσ ì
monitor« Oncσ complete¼ thσ addres≤ oµ thσ BDO╙ i≤ adjusteΣ ì
s∩á tha⌠ thσ ZE╪ monito≥ anΣ it≤ commanΣ streaφ wil∞ no⌠á bσ ì
overwritteεá b∙ transien⌠ programs¼á anΣá executioεá begins« ì
EacΦá timσá thσ BIO╙ Consolσ Inpu⌠ routinσá i≤á called¼á ZE╪ ì
supplie≤ thσ inpu⌠ character.
A≤ witΦ SUB¼ ß ^├ froφ thσ consolσ wil∞ abor⌠ executioε ì
oµ ß ZE╪ commanΣ stream«á Also¼á a≤ witΦ SUB¼á iµ ß commanΣ ì
follow≤á ZE╪á iε ß Multiplσ CommanΣ Line¼á ZE╪ append≤á thi≤ ì
commanΣ t∩ thσ commanΣ stream.
Unlikσá SUB¼á ZE╪á doe≤ no⌠ permi⌠ nestinτá oµá commanΣ ì
files«áá ZE╪á wil∞á simpl∙á abor⌠á iµá ßá ZE╪á commanΣáá i≤ ì
encountereΣ iε thσ commanΣ streaφ i⌠ i≤ processing.
Unlikσá SUB¼á ZE╪ support≤ man∙ morσ embeddeΣ commands« ì
Combininτ thσ facilitie≤ oµ SU┬ anΣ XSU┬ iε thi≤á case¼á thσ ì
embeddeΣá command≤ oµ ZE╪ reflec⌠ thσ XSUB-likσ capabilitie≤ ì
oµ ZE╪ a≤ wel∞ a≤ somσ ne≈ ideas.
Thesσáá extendeΣá contro∞á command≤á arσá discusseΣá iε ì
anothe≥ informatioε section.
Selected Error Messages:
None discussed
Examples of Use:
ZEX
-- the user now enters a group of commands
ZEX mycmds p1 p2
-- processinτ oµ thσ filσ 'mycmds.ZEX'¼ or¼ iµ no⌠ ì
found¼ 'mycmds.SUBº i≤ performed╗ 'p1º i≤ substituteΣ fo≥ $▒ ì
and 'p2' for $2
:D
ZEX Directives - Control Commands
The following summarizes the ZEX Control Commands:
Cmd Meaning Cmd Meaning
| insert <CR> ^| insert <CRLF>
^║ reruε commanΣ streaφ ^« togglσ prin⌠ suppress
^# toggle ZEX messages ^$ define default params
^? wait for user input ^/ ring bell and ^?
^* ring bell ^" accept user input
^< display chars only ^> stop display
;; ZEX comment $n 1<=n<=9 for param
$$ $ $^ ^
$| | ^c control char
Thi≤á summar∙á i≤ als∩ displayeΣ viß thσá built-iεá ZE╪ ì
help.
Thσá followinτ command≤ simpl∙ inser⌠á character≤á int∩ ì
thσá ZE╪á commanΣá streaφ anΣ wil∞ no⌠ bσ discusseΣá iεá an∙ ì
greate≥ detail.
| inserts a <CR> ^| inserts a <CR> <LF> pair
$$ inserts a single $ $^ inserts a single ^
$| inserts a single | ^c inserts a control character
Thσ ^¬ commanΣ simpl∙ cause≤ ZE╪ t∩ rinτ thσ bell«á I⌠ ì
doe≤ no⌠ inser⌠ ß BEL╠ characte≥ int∩ thσ commanΣ filσá likσ ì
ß ^╟ sequencσ would« I⌠ simpl∙ ring≤ thσ bel∞ anΣ continue≤ ì
processing.
Thσ ;╗ commanΣ i≤ ß ZE╪ comment« I⌠ anΣ al∞ character≤ ì
followinτá i⌠ u≡ t∩ anΣ includinτ thσ followinτ <LF╛ arσ no⌠ ì
includeΣ iε thσ ZE╪ commanΣ stream« The∙ arσ simpl∙ treateΣ ì
a≤ ß commen⌠ iε thσ ZE╪ CommanΣ Filσ anΣ ignored«á Unlikσ ß ì
conventiona∞ ZCPR│ comment¼ thσ ZE╪ commen⌠ doe≤ no⌠ takσ u≡ ì
spacσá iεá thσ commanΣ streaφ anΣ doe≤ no⌠ appea≥á wheεá thσ ì
commanΣ streaφ i≤ executed.
Thσá ^╝ anΣ ^╛ command≤ arσ useΣ t∩ bracke⌠á character≤ ì
whicΦá arσ simpl∙ echoeΣ b∙ thσ ZE╪ monito≥ anΣá no⌠á passeΣ ì
bacδá t∩á thσ callinτ program«á Thi≤ cause≤ thσá character≤ ì
betweeεá thesσá command≤á t∩ bσ echoeΣ t∩á thσá use≥á durinτ ì
executioε bu⌠ no⌠ processeΣ b∙ an∙ program« Thi≤ featurσ i≤ ì
ver∙ gooΣ fo≥ embeddinτ comment≤ t∩ bσ printeΣ a⌠á executioε ì
timσá int∩á thσ commanΣ stream«á Unlikσ thσá ZCPR│á commen⌠ ì
form¼á whicΦ i≤ ß linσ beginninτ witΦ ß semicolon¼á comment≤ ì
encloseΣ b∙ ^╝ anΣ ^╛ ma∙ appea≥ anywhere¼ sucΦ a≤ withiε aε ì
edito≥ session.
Thσá ^úá commanΣá toggle≤á suppressioεá oµá informativσ ì
message≤ generateΣ b∙ ZEX.
Thσ ^« commanΣ cause≤ consolσ outpu⌠ t∩ ceasσ unti∞ thσ ì
nex⌠á ^«á i≤á encountered«á Characte≥á inpu⌠ froφá thσá ZE╪ ì
Monito≥ continues¼ bu⌠ thσ use≥ doe≤ no⌠ seσ wha⌠ i⌠ is.
Thσá ^║á commanΣá cause≤á thσ ZE╪á monito≥á t∩á restar⌠ ì
executioε oµ thσ loadeΣ commanΣ stream«á Thσ entirσ commanΣ ì
stream¼á a≤á initiall∙ processeΣ b∙ ZEX¼á i≤ executeΣá agaiε ì
froφ thσ beginning.
$n¼á wherσ 1<=n<=9¼á wil∞ causσ thσ indicateΣ specifieΣ ì
o≥á defaul⌠á paramete≥ t∩ bσ substituteΣá froφá thσá commanΣ ì
line.
Thσ ^ñ commanΣ i≤ useΣ t∩ definσ o≥ redefinσ thσ se⌠ oµ ì
inpu⌠á commanΣ parameters«á Thσ res⌠ oµ thσ linσá followinτ ì
thσá ^ñá i≤á treateΣá a≤ ß se⌠ oµá parameter≤á separateΣá b∙ ì
blanks.
Thσ ^┐á anΣ ^» command≤ replacσ thσ /┴ anΣ /A┬á option≤ ì
oµ SUB«á ^┐á cause≤ ZE╪ t∩ sto≡ processinτ anΣ wai⌠ fo≥ thσ ì
use≥ t∩ strikσ eithe≥ thσ spacσ ba≥ o≥ thσ RETUR╬ ke∙ beforσ ì
continuing«á Thσá use≥á caε takσ hi≤ timσ anΣá examinσá thσ ì
display¼á and¼á iµá hσ doe≤ no⌠ wisΦ t∩ continue¼á ß ^├ wil∞ ì
abor⌠ thσ commanΣ stream« Thσ ^» commanΣ i≤ likσ ^?¼ bu⌠ i⌠ ì
periodicall∙á ring≤ thσ bel∞ a⌠ thσ console¼á summoninτá thσ ì
use≥ iε aε alarφ fashion.
Finally¼á thσá ^ó commanΣ cause≤ ZE╪ t∩ sto≡á providinτ ì
inpu⌠á froφ thσ commanΣ streaφ anΣ allo≈ thσ use≥á t∩á inpu⌠ ì
whateve≥á hσ wishe≤ unti∞ ß specia∞ characte≥ i≤ output¼á a⌠ ì
whicΦ timσ ZE╪ wil∞ resumσ providinτ input«á Iε thi≤á case¼ ì
ZE╪ caε bσ intimatel∙ linkeΣ witΦ ZCPR3¼á anΣ i⌠ i≤ intendeΣ ì
tha⌠á thσá specia∞á characte≥á tha⌠ ZE╪ i≤á waitinτá fo≥á i≤ ì
associateΣ witΦ thσ ZCPR│ prompt«á Iε m∙ case¼á ╔ madσá thσ ì
ZCPR│ promp⌠ t∩ bσ ß ">ó characte≥ witΦ thσ mos⌠ significan⌠ ì
bi⌠á set«á Thi≤ i≤ uniquσ anΣ appear≤ onl∙ wheε thσá promp⌠ ì
come≤ u≡ oε m∙ system.
Thσáá followinτáá example≤áá illustratσááá application≤ ì
employinτ them«á Comment≤ appea≥ ou⌠ t∩ thσ side¼á prefixeΣ ì
b∙ <--.
B1>zex
ZEX, Version 1.3
1: ^$ this is fun <-- Define 3 params
2: echo $1 $2 $3
3: ^$ hello from happy acres <-- Define 4 params
4: echo $1 $2 $3 $4
5:
(ZEX Active) <-- ZEX is running now
B1>echo this is fun
THIS IS FUN
B1>echo hello from happy acres
HELLO FROM HAPPY ACRES
B1>
(ZEX Completed)
By Your Command >
B1>ed demo.zex <-- Demo Command File
NEW FILE
: *i
1: ed demo.txt <-- Edit DEMO.TXT
2: i <-- Insert text while in ED
3: This is a test
4: This is only a test
5: This is a demo of ZEX Control
6: ^Z <-- ^Z is 2 chars, xlated into
7: b0lt <-- Ctrl-Z by ZEX
8: 1l
9: 0lt
10: i <-- Input More Text
11: ^" <-- Allow user to input text
12: type demo.txt <-- When ZEX continues, this
13: era demo.txt <-- is what it does next
14:
: *e
B1>zex demo <-- Run the command file
ZEX, Version 1.3
(ZEX Active)
B1>ed demo.txt
NEW FILE
: *i <-- ZEX is typing this in
1: This is a test
2: This is only a test
3: This is a demo of ZEX Control
4:
: *b0lt
1: This is a test
1: *1l
2: *0lt
2: This is only a test
2: *i <-- Now user input begins
2║ ╔ aφ no≈ typinτ thi≤ linσ oµ m∙ owε volitioε <-- User
3: ZEX will allow me to continue doing this until
4: it sees the ZCPR3 prompt
5: <-- User types Ctrl-Z
5: *e <-- User types "e"
(ZEX Active)
B1>type demo.txt <-- ZEX resumes
This is a test
I am now typing this line of my own volition
ZEX will allow me to continue doing this until
it sees the ZCPR3 prompt
This is only a test
This is a demo of ZEX Control
B1>era demo.txt
DEMO .TXT
B1>
(ZEX Completed)
By Your Command >
B1>ed demo.mac <-- Now to use ZEX for
<-- program assembly
NEW FILE
: *i <-- User types program
1: ext print
2:
3: call print
4: db 'Hello, World ... It''s Another Day',0
5: ret
6:
7: end
8:
: *e
B1>type a:m80.zex <-- M80.ZEX 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>zex m80 demo <-- Run command file on pgm
ZEX, Version 1.3
(ZEX Active)
B1>; M80.SUB -- MACRO-80 Assembler and Linker
B1>M80 =DEMO
No Fatal errr(s)
(ZEX Active)
B1>; Please Type ^C if Error(s) Exist - <-- User can abort now
<-- if he wishes
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 01C5 < 197>
35936 Bytes Free
Data 0100 01C5 < 197>
35936 Bytes Free
[0000 01C5 1]
(ZEX Active)
B1>ERA DEMO.REL
DEMO .REL
B1>; Assembly Complete
B1>
(ZEX Completed)
By Your Command>demo <-- Run pgm now
Hello, World ... It's Another Day
B1>
:1
Thσ followinτ restriction≤ arσ applieΣ t∩ commanΣ file≤ ì
processeΣ b∙ SU┬ anΣ ZEX.
SUB Restrictions
1«á Yo⌡ ma∙ no⌠ loτ int∩ use≥ area≤ othe≥ thaε thσ onσ ì
yo⌡ begaε processinτ thσ commanΣ filσ in«á Iµ yo⌡ do¼ ZCPR│ ì
loose≤á tracδ oµ thσ $$$.SU┬ filσ anΣ executioεá i≤á aborteΣ ì
unti∞á yo⌡á reente≥ thσ origina∞ use≥ area¼á a⌠á whicΦá timσ ì
executioε resumes.
2«á U≡á t∩á 2░á parameter≤ arσ permitteΣá oεá thσá SU┬ ì
commanΣ line.
3« Yo⌡ ma∙ nes⌠ SU┬ commanΣ file≤ t∩ an∙ depth.
ZEX Restrictions
1«á Yo⌡ ma∙ movσ int∩ an∙ director∙ yo⌡ desirσ whilσ ß ì
ZE╪ commanΣ streaφ i≤ beinτ executed.
2« U≡ t∩ ╣ parameter≤ arσ permitteΣ oε thσ ZE╪ commanΣ ì
line.
3« Yo⌡ ma∙ NO╘ nes⌠ ZE╪ commanΣ files.
:2
BotΦá SU┬ anΣ ZE╪ makσ nicσ ExtendeΣ CommanΣ Processor≤ ì
unde≥á ZCPR3«á BotΦá usσá thσ Externa∞á PatΦá anΣá Multiplσ ì
CommanΣ Linσ Buffe≥ Facilitie≤ oµ ZCPR3¼á anΣ ZE╪ i≤ furthe≥ ì
prompteΣ fo≥ inpu⌠ b∙ thσ ZCPR│ promp⌠ iµ desired.
T∩ refresΦ thσ reader¼á anΣ ExtendeΣ CommanΣá Processo≥ ì
i≤á ßá prograφá invokeΣ b∙ ZCPR│ wheε i⌠ fail≤ t∩á finΣá thσ ì
commanΣ alonτ it≤ path« ZCPR3¼ upoε failinτ t∩ finΣ thσ CO═ ì
filσ whicΦ correspond≤ t∩ thσ commanΣ namσ giveε t∩ it¼á caε ì
bσá se⌠ u≡ t∩ eithe≥ searcΦ thσ patΦ o≥ g∩ directl∙á t∩á thσ ì
roo⌠ oµ thσ patΦ anΣ looδ fo≥ aε ExtendeΣ CommanΣ Processor« ì
Iµ found¼ ZCPR│ simulate≤ ß commanΣ t∩ tha⌠ ExtendeΣ CommanΣ ì
Processor¼á substitutinτá thσá user'≤á commanΣ linσá a≤á thσ ì
argument≤ t∩ it.
To illustrate, consider the following example:
MASM.ZE╪ perform≤ thσ samσ se⌠ oµ command≤ tha⌠ M80.ZE╪ ì
filσ diΣ above¼ namely:
; MASM.ZEX -- 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
Thσá commanΣá "MAS═ DEMOó i≤ issued«á WitΦ ZE╪ a≤á thσ ì
ExtendeΣ CommanΣ Processor¼á ZCPR│ look≤ alonτ thσ patΦá fo≥ ì
thσ commanΣ MASM¼á fail≤ t∩ finΣ it¼á anΣ theε simulate≤ thσ ì
commanΣá "ZE╪á MAS═ DEMO"«á Thσ abovσ commanΣ filσ i≤á theε ì
executeΣ witΦ DEM╧ a≤ it≤ passeΣ parameter.
ZEX¼á o≥á an∙á othe≥ program¼á caε bσ installeΣá a≤á aε ì
ExtendeΣ CommanΣ Processo≥ b∙ renaminτ i⌠ t∩ CMDRUN.COM.