;
Redirectable I/O Under ZCPR3 and SYSIO
-- Concepts --
1 - ZCPR3 and SYSIO
2 - ZCPR3 and I/O Redirection
-- Commands --
C - CPSEL
D - DEVICE
E - DEV
L - LDR
R - RECORD
:1
Redirectable I/O Under ZCPR3
Th� concep� o� redirectabl� I/� involve� th� assignmen� �
o� physica� device� t� logica� devices�� ZCPR�� an� CP/� �
suppor� fou� logica� devices:
CON: - Console - An I/O Device for User/System Commo
LST: - Printer - An Output-Only Device for Printouts
RDR: - Reader - An Input-Only Device
PUN: - Punch - An Output-Only Device
Unde� CP/M�� ther� ar� onl� fou� physica� device� whic� �
ma� b� assigne� t� eac� o� th� fou� logica� devices�� Unde� �
ZCPR3�� ther� ma�� b� a� man� physica� device� a� desire� �
whic� ma� b� assigne� t� eac� o� th� fou� logica� devices.
�� "physica� device�� i� th� traditiona� sens� i� � �
conventiona� I/� device�� lik� � CR� o� � Printer�� I� th� �
sens� o� ZCPR3�� i� i� � devic� driver� o� bod� o� software� �
whic� i� communicate� wit� vi� th� BIOS�� Thi� bod�� o� �
software� i� turn� ma� communicat� wit� an� devic� O� SE� O� �
DEVICE� tha� i� wishes.
SYSIϠ i� � sampl� se� o� Redirectabl� I/Ϡ Driver� �
designe� t� b� use� wit� ZCPR� o� m� system�� Unde� SYSIO� �
some of th� "physica� devices� implemented are:
CON: Devices - TTY
CRT
CRT Input and CRT/Remote Computer Output
CRT and Modem Input and CRT and Modem Output
in Parallel
CRT Input and CRT/Modem Output
LST: Devices - TTY
CRT
Modem
Remote Computer
RDR: and PUN: Devices - Clock
A� yo� ca� see�� th� "physica� devices� unde� ZCPR� ca� �
b� combination� o� actua� devices�� Th� CRԠ Inpu� an� �
CRT/Remot� Compute� Outpu� device�� fo� instance� i� use� t� �
allo�� � remot� compute� recor� scree� display� whic� g� t� �
th� CRT.
Unde� ZCPR3� a� man� sets� o� packages� o� Redirectabl� �
I/Ϡ Driver� a� desire� ca� b� created�� Eac� packag� ca� �
giv� th� use� differen� type� o栠 capabilities��� Fo� �
instance�� on� packag� ca� b� lik� th� abov� exampl� whil� �
anothe� packag� ca� provid� Dis� Recordin� capability�� suc� �
a� CR� Inpu� an� CRT/Dis� Fil� Output.
Th� ZCPR�� Syste� o� Program� contain� fou� utilitie� �
designe� t� suppor� th� Redirectabl� I/Ϡ System�� Thes� �
utilitie� an� thei� function� are:
LDR -- Load a Redirectable I/O Package
DEVICE -- Display and Select Physical I/O Devices
DEV -- Shorthand form of DEVICE
RECORD -- Turn on and off the Recording Facility
Thi� HEL� Fil� discusse� thes� utilitie� an� ho�� the� �
ar� intende� t� b� used.
Implementatio� detail� fo� I/� Package� ar� lef� t� � �
stud�� o� th� sourc� cod� o� th� sampl� I/� Packag� an� th� �
ZCPR3 book.
:L
Loading Redirectable I/O Drivers -- LDR
On� o� th� man� function� o� LD� i� t� loa� a� I/� �
Packag� int� th� prope� memor� buffer�� LD� perform� thi� �
function when given a file specification of type IOP:
LDR myio.iop
will load MYIO.IOP as an I/O Package.
LDҠ perform� � structur� chec� befor� approvin� th� �
load.
:D
Command: DEVICE3 1.0 (DEVICE)
Syntax:
DEVICE <-- Enter Interactive Command Mode
Function:
DEVICŠ i� use� t� allo� th� use� t� interactivel� �
displa��� th� name� o� th� availabl� physica젠 device� �
(actually�� devic� drivers�� whic� ma� b� assigne� t� th� �
logica� device� an� t� allo� th� use� t� assig� � physica� �
devic� t� � logica� devic� b� name.
Options:
None
Comments:
DEVICРonl� run� i� a� interactiv� mode�� I� respond� �
t single-characte� commands��� completin� th堠 comman� �
sequences in response and prompting the user.
The following commands are recognized by DEVICE:
D - Display Device Names
C - Select Console Device (CON:)
L - Select List Device (LST:)
P - Select Punch Device (PUN:)
R - Select Reader Device (RDR:)
X - Exit
Th� Displa� Devic� Name� comman� (D� ask� th� use� fo� �
the devices to display. His responses are:
A - All
C - Consoles
L - Lists
P - Punches
R - Readers
Th� Exi� comman� exit� t� ZCPR� withou� promptin� fo� �
confirmation.
Th� othe� fou� command� (C� L� P� an� R� assig� device� �
IMMEDIATELY�� Th� use� type� th� nam� o� th� devic� t� b� �
assigned�� I� h� strike� � retur� i� respons� t� th� devic� �
name prompt, the command is aborted.
Selected Error Messages:
Self-Explanatory
Examples of Use:
DEVICE
-- invoke utility
:E
Command: DEV 1.0
Syntax:
DEV command,command,...
Function:
DE֠ i� � utilit� whic� enable� th� use� t� manipulat� �
th� ZCPR� redirectabl� I/� devic� drivers�� I� allow� th� �
use� t� displa� th� name� o� th� curren� device� an� selec� �
them.
Unlik� it� counterpart�� DEVICE�� DE� accept� al� inpu� �
from the command line and is not interactive.
Options:
None
Comments:
An� DE� comman� ma� tak� th� followin� forms� Onl� th� �
first letters are significant in the these commands:
DISPLAY ALL <-- Display names of all devices
DISPLAY CON <-- Display consoles
DISPLAY LST <-- Display printers
DISPLAY PUN <-- Display punches
DISPLAY RDR <-- Display readers
D A is the same as DISPLAY ALL.
Th� ful� devic� nam� mus� b� give� i� th� followin� �
commands��� Onl�� th� firs� characte� an� th� '=�� ar� �
significant in the rest of the command.
CON:=name LST:=name PUN:=name RDR:=name
C=name is the same as CON:=name.
Selected Error Messages:
"DE֠ NOԠ Initialize� wit� I/� Base� mean� tha� thi� �
ZCPR3 System does not support Redirectable I/O.
"Redirectio� No� Supported�� mean� tha� th� loade� �
drivers in the I/O Package do not support redirection.
Examples of Use:
DEV C=CRT,L=TTY
-- assign CRT to CON: and TTY to LST:
:R
Command: RECORD 3.0
Syntax:
RECORD ON or OFF <-- Console Recording
or
RECORD ON or OFF PRINTER <-- Printer Recording
Function:
RECORĠ i� use� t� contro� th� Dis� Outpu� Facilit�� o� �
th� Redirectabl� I/� Drivers� Copie� o� Consol� an� Printe� �
output� ca� b� create� i� dis� file� b� th� us� o� thi� �
facility�� an� i� ma� b� extende� int� � numbe� o� othe� �
application� a� well.
Options:
ON - Enable Recording
OFF - Disable Recording
P - Reference Printer
Comments:
Fo� RECORĠ t� perfor� it� function��� i� mus� b� �
implemente� i� th� Redirectabl� I/� Drivers�� Thi� i� lef� �
a� a� exercis� fo� th� reader� Th� Redirectabl� I/� Driver� �
supplie� wit� ZCPR� hav� simpl� RETur� instruction� a� th� �
subroutine� execute� b� th� RECOR� functions.
Fou� routine� ar� accesse� i� th� Redirectabl� I/� �
Drive� packag� t� contro� th� RECOR� function� The� are:
COPEN -- Enable Recording Console Output
LOPEN -- Enable Recording List Output
CCLOSE -- Disable Recording Console Output
LCLOSE -- Disable Recording List Output
RECOR� i� indirectl� tie� int� DEVICE� Invokin� RECOR� �
itsel� doe� no� necessaril� star� th� recordin� proces� �
immediately��� Tw� function� mus� tak� plac� t� begi� �
recordin� outpu� ont� dis� files:
1) RECORD has to turn the appropriate Driver ON
2) DEVICE has to select the appropriate Driver
B� turnin� RECOR� OF� durin� � recordin� session�� th� �
outpu� fil� i� close� an� availabl� fo� othe� uses�� I� �
RECORĠ i� late� turne� ON�� th� outpu� fil� ma� b� delete� �
(i� th� sam� fil� i� selecte� t� recor� into)�� However� i� �
� ne�� devic� i� selecte� whil� RECOR� i� OР(say�� DEVIC� �
CON:=CR� i� issued)� the� recordin� i� SUSPENDE� (NO� turne� �
off�� unti� th� recordin� devic� i� selecte� again�� Wit� �
thi� capability�� i� i� look� lik� th� recordin� sessio� i� �
no� goin� well�� recordin� ca� b� suspended�� th� proble� �
fixed� an� the� recordin� ca� b� resumed.
Thi� combine� syste� o� DEVIC� an� RECOR� provide� � �
flexibl� outpu� recordin� system�� I� addition�� th� outpu� �
recordin� nee� no� necessaril� g� t� � dis� file�� I� coul� �
b� se� u� t� sen� CON�� outpu� t� th� CR� and� say� � Remot� �
Compute� fo� processing.
Selected Error Messages:
"I/� Drive� Addres� NO� Defined� mean� tha� ther� i� n� �
I/O Package in this ZCPR3 System.
"Dis� Drive� Modul� NO� Loaded� mean� tha� th� I/� �
Package does not support the RECORD facility.
"N� I/Ϡ Drive� Modul� Loaded� mean� tha� LD� ha� no� �
been run to load an *.IOP file.
Examples of Use:
RECORD ON
- turn on recording for the console
RECORD ON P
- turn on recording for the printer
:2
Redirectable I/O and the ZCPR3 System
Th堠 ZCPR�� Syste� ca� functio� wit蠠 o� withou� �
Redirectabl� I/Ϡ a� implemente� b� th� Redirectabl� I/� �
Drive� Package� an� th� LDR�� DEV�� DEVICE�� an� RECOR� �
programs�� Obviously�� th� ZCPR� Syste� i� mad� muc� mor� �
flexibl� b� employin� thes� facilities.
DEVIC� an� RECOR� ar� tie� directl� t� th� Redirectabl� �
I/Ϡ Package� themselves�� The� don'� us� an� o� th� othe� �
feature� o� th� ZCPR� Syste� t� spea� of�� an� the�� ar� �
installe� b� Z3INS.
Th� program� controllin� th� Redirectabl� I/Ϡ Driver� �
ar� tie� togethe� i� thi� manner:
LDR loads the drivers
DEVICE controls the drivers
DEV controls the drivers
RECORD enables and disables the recording
facilities of the drivers
:C
Command: CPSEL 1.0
Syntax:
CPSEL cmd1,cmd2,...
Function:
CPSE̠ (CRT/Printe� SELect� i� � ZCPR�� utilit�� whic� �
permit� th� use� t� dynamicall� selec� th� CR� (o� CR� � an� �
CRԠ 1� an� Printe� (o� Printer� 0�� 1�� 2�� an� 3� fro� th� �
curren� ZCPR�� Environmen� Descriptor�� Thi� dynamicall� �
change� th� characteristic� o� th� printe� an� CR� whic� ar� �
used by other ZCPR3 utilities, such as PRINT.
Options:
None
Comments:
The commands may be any of the following:
Cc, c=0 or 1 -- Select CRT 0 or CRT 1
Pp, p=0-3 -- Select Printer 0-3
Dd, d=A (All), C (CRT), P (Printer)
-- Display Selection Values
Th� value� affecte� b� thes� selection� includ� numbe� �
o� line� an� column� o� th� CR� an� numbe� o� line� an� �
column� o� th� printer�� Th� abilit� o� th� printe� t� for� �
feed is also included.
Selected Error Messages:
None
Examples of Use:
CPSEL DA
- display all devices
CPSEL C1,P3,DA
- Select CRT 1 and Printer 3; display all devices
when done