22687 90020_Access Internals 90020 Access
22687-90020_AccessInternals 22687-90020_AccessInternals
User Manual: 22687-90020_AccessInternals
Open the PDF directly: View PDF
.
Page Count: 737
| Download | |
| Open PDF In Browser | View PDF |
HP 2000
COAIFUTEn SY s Till~i
SOURCES AND
LISTI~GS
DCCl;1,:tl:TATION
HF PART NU1illER 226B7-90020
PREFACE
This manual is a guide to the sources and listings of the HP 2000
Computer System."
The source of the system can be used to make
I
modifications to the system; the listings and tilis manual can be
used to help understand the internal workings of the HP 2000
,
Computer System.
This manual is divided into three parts.
Part I js ·a description
of the physical format of the magnetic tapes (22703-l000l-Listing,
22703-l0002-Sources, 22703-l1001-Listings on 1600 bpi magnetic
tape, and 22703-l1002-Sources on 1600 bpi magnetic tapes) and a
description of the BASIC program supplied to extract portions
of the listings.
Part II is the inLernal maintenance specifica-
tions for the system processor.
It includes details on the oper-
ation of the system master program, the system loaders, the BASIC
language processor, and the operating system.
Part III includes
details on the Input/Output Processor program and its configurator.
PART I
SOURCES AND
LIS'l'lNGS
SQuc.c:es
T~e
source listings are supplied as BASIC Formatted Files on e
se1ective dump tape of account Z10l.
Eac~ line Of source Is
stored In one ,strln9. The Files are:
APPROXIMATE NUMBER'
~a~E
OE_e~OC~s
S2A83
715
55155
725
57900
71~
57905
72~
SA5FH
SRSTLD
5C2A83
5CSIS5
228
2b
5C7900
5C790S
340
SCIl)
SCRn
5CRC
SCR5LD
5004
50110
0511C
05120
5012C
50130
SD13C
50140
5014C
502741
5D274C
50274£
50340
S034C
5043
5DSOCD
5051
SOS30
135
11
85
7
52
34b
344
344
11
120
12
107
10
70
10
68
115
27
27
13
214
b3
218
SSl
9
SD53C'
22~
5061
332
~OQULE
System processor loader wi t~ 2883 d t sc
driver
System processor loader wi tn 7905/2883
dl sc driver
Sistem processor loader wi tho 7900 dl sc
dr I ver
System processor loader ~.th 7905/7900
disc dr\var
A5FH (lOP mOdule)
Paper tape bootstrap loader
Conversion program For 2883 disc system
Conversion program For 7905/2883 disc·
system
Conversion program for 7900 disc system
Conversion program for 7905/7900 diSC
system
CIO (lOP module)
CRO (lOP module)
CRC (lOP module)
2100 Cross loader
0.04 (lOP mOdule)
0.110 (lOp module)
D.llC (lOP module)
O.l~O
(lOP module)
D.12C (lOP module)
D.IJO (lOP module)
D.l3C (lOP module)
0.140 (lOP module)
D.14C (lOP module)
0.2141 (lOP module)
D.2/4C (lOP module)
0.274E (lOP mOdule)
0.340 (lOP module)
0.34C (lOP module)
D.4~ (lOP mOdule)
D.SOCD (lOP mOdule'
0.51 (lOP modu I e)
O.SJO (lOP ~odule)
D~S3C
(lOP module)
0.61 (lOP mOdule)
i-I
A~PRO)(IMATl:.
L.E~Glt'
~8~t.
~ODWl.f::
62
5Dh2
200
29
SDb3
SDUMP
SHIO
UUM.., ( lOP mOdulI;')
MIO ( lOP r'lodule)
hLO ( loP mOtiUle)
hLC ( lOP mOdul~)
HMU ( lOP Mocule)
62
SHL'(J
14
SHLC
lHU
S~MO
C:;~
( lOP f"';Odule)
( lOP MOdule)
D.bt!
D. b:i
SM~O l·~
12
Ht-lllI-i
SHI-JO
14
.... ""1)
s .... ""c
1~1
c:.IC~~
c:',:)'-,
SIt)r
~q~
1~14-
SIf)IoJC
SLPO
11
SLj:J~
~~
CiLTO
SLTC
r.hh
~h
SMt::M .... Y
4-4-
S'-4N
1~
SMNk>IQ
.117
5~1I)(H
11
c;p~C
72
( I (IP
MI\J
C;P~O
~
4
'~Pu
S~~C
1~7
t-f~C
C:;S''t'NCi I
Co\c:: V "JJ ~
Cll4
It">
'7 -f~ t)
Tn~
~sse~nler
IS
sv~no~
t~hle
H~
foJrOCp.5sor
",~I"'I
r)l
~lfJO
SC
~vall~ble
oro~rCt""
t- t OCKS
~ss~mr:"Y
l;.,ncucHJ(;\.
""'~ SlJCOorteo
H~ ,jUl'tJ c;ysterns"
An
foor riP
from tne
H~
~ontrl~uteo
must
b~
tBK~n
1~t')I('
svste~s.
SD~ce
5t
14clfU
I!I!Ire dval
,jAO/~70
~o"ule)
w~rmst~rt
sourCE' cOde 'IS
~SSI?~t'1ler~
IHM
~y
~~h
AoorO)l1 mC!'te Tota I
( I n~
( r f'\P
''1<"'au I p)
~Y~'C1)
( IOIJ mOdule)
SV"J 1 H (I o~ mOdulf:o)
'rP'-1b~
( I C"P I"flOdule)
jl;)..,
SWS~I.d.,
Ie)
( InP mOC"lule)
twlt.J"~ I H
( 10"" ",ol'1ul~)
( 1 t)~ mOdulf')
~po
( IO~ mooulr)
~PC
( 101-1 I"\otiulp.)
f.-.Jv ( 1 OJ..' "..Odu.I p )
~~~o
S 1 ..1(., ....
c:, Tes;,
mOC1ul~)
MOr~u
Mt..JRCO
h~
SPPO
( r nP
~f:·'·.H~Y
1~3
SMN~CP
mO("llJl~)
LtlO ( J np rr.O~·I',J • p)
LPC ( I0P mOdule)
LTO ( I ('I~ mO("'lulf?)
LTC ( lOP f"!"IOdu'P)
~aster Pr ot:u" c!!!'P'I
H
S'-4C~~C;
(In~
( 1 ()!J '1"!Odule)
H~<':
( J o~ mOrlu'e)
J Cf( 1-1 ( lOP ""Odulil!')
InC ( I ()J:.' mOoul@)
Inpc ( lor' moou'e)
c~r~
€XIstS.
DOS ~nd
Ps~ecldl
1-2
Iv for
to
I ~br~ry
~ssure
the
fO~
us~
sufficient
syste~
oroc~ssor.
on
LlSIl~GS
The system so~t~are I *stfngs are supplied as BASIC form~tted
~t les on a selective' dump tape of account Zl02.
Each line of
the listing Is stored as a string •.. Tne first char~cter of.
each string Is actually a 11ne printer eTl COde which should be
written to the line pr'nter be~ore the line In order to .nsure
orooer spactnq on the outout 'istinq •
. The orogram LISTER. has been sUDol led to prOduce I istings for the
user In the proper format.
To use this program, log on to
account Zl02. Then:
EXE-L ISlER
LISTE~
Enter name o~ mOdule to be listed i XXXXXX
Enter I isting destination (Hit for terminal) YYY
DONE ,
xxxxxx Is the name 0'+ the mOdule to be listed, )(XX is the file
desjqnator 0+ the I *stlnq device.
The
~
i
I es ar e:
APP~OXIMATE
NUMe£R
OE_eLOC~S
1429
L'iISS
1497
L7QOO
1429
L790S
1454
LASFh
LBSTLD
LC2883
LCSISS
79b
795
LC7900
LC7905
798
797
LCIC
LCRO
LCRC
LCQSLD
12b
12
LD04
191
56
77
13
42
~OQULE
System processor loader with 2883 disc
dr i ver
System processor loader with 790S/2d83
disc driver
System processor loader with 7900 dl sc
driver
System orocessor loader wi th 7905/7905
d.sc driver
ASFH ( lOP module)
RSTLD (lOP module)
Conversion Program for 2883 Of sc. System
Conversion Program for 790b/2b83 01 sc
.SyS tem
conversion Program for 1900 Oi sc System
Conversion Pro.qram for 7905/7900 .D i sc
System
CIO (lOP mOdule)
CRO (lOP mOdule)
CRe ( lOP mOdule)
2100 Cr os s Loader
D.04 ( lOP module)
"1-3
tl~PROX I~'ATt.
bla~E
LOllu
LOllel
.LI11?O
LD12C
L0130
'- 0 13C
Ln140
Lr·14C
LD?14l
tD274C
LD?74 ...·
LD:it.,.l)
LE~C2It;j
to;
115
11
~2
~
72
f.j
"9
<13
17
14
~OOULt:.
mOdule)
I'lOdule)
1"I0dule)
MOdulp.)
u.lc'C
mOdule)
U.13u
D.13C (lOP I"'\odule)
U. J.4(1 ( InloJ mOdulp.)
U. 14r; ( lot-J mOc1ulp.)
LJ.2741 ( J Of.' r"'Iodule)
( J np MOc1UIf1)
U.~74C
L>.~-/4F
( I Of..> mOc1ulp.)
lJ. ,:,,"- (J ( In~ mOriule)
U.,j"c ( I f)f.J ITIOoul p )
L> • .:.. .i ( J OP "'OOll Ie)
0.110
L>.llC
U.l.?O
(lOP
( lOP
( lOP
( lOP
( lOP
Lf')~4C
11
1 ';0
L04.1
L050r::n
221
L; • ~) 0 C I~
d14
C)t?O
C)r7
"IOOU I e)
lie ::»1 for 1 c, Dorts ( lOP MOrJU Ie)
for .i~ norts ( 10 .... mo,;u Ie)
U.~l
L). ':t 1 0 ( I ~~ f")(')dulp.)
U.":;C ( t n~ mOdlJ I£')
LD~OTioo\
LDC,1A
Ln~lH
6~
Ln~30
t".
LI)c;3C
1H4
l DI-.l
.jl~
L:),",~
bet
Ln,..~
172
Lnl.JM~
27
LI-iIocl'i
LHIOI"'i
LHLflCn
LHL 0 I ~
LHlCCiJ
LrlLCtH
~("
~4
14
L.... '.1 OCr)
1"'1~ I
16v
bf,
LH\~()T~
:;]
LHj.oIOlrl
LH""OCn
13
14
14
LH~OIk
Lrl~CCD
12~
LHh'Ct~
Id7
LICt\~
?-Sl
1
L J..:; TI=: k'
LIne
Llf')IJC
?~ :,
1004
U.~Gl~
( I f)P '"0 dlJ I (1)
( I Of-' mOoulp.)
l.;. t"1~ (r()~ mOdule)
l)\)Mi.l
( 1 (l ~ monule)
t"1tv for r.OC ( I ("I~ MOnu I (.)
hlO for IHM ( 10 P r."',0C1 u If»
r-tL 1I
for coe ( Tr,j;) ""otju I ~~)
HLf) ;'or T... ~. ( I ()?-- ~ooulp)
hLC +-or Ciie ( J nj.J MOC1U I p)
HLC for r ~~ tA, ( TnPJ mOr1ult:)
~ ('!..,
CuC
HII.=I;
;'or
I~M
(lOP
•. HMU
( J OP
rr"Od u I (.)
( I PP mOdule)
. H~II ~nr I H"': ( 1 tjp ""ot":ulf')
HL.,)I.I 4-or Cfl~ ( I ()~ "'Ooulf=')
""~ u for T ';r'" ( I () P i.lOC1lA I P)
H~C . f. or
cue ( TnP MoclJlp)
t"1~C
fo" I f, IV' ( 1 (lP mOeju Ie)
lCKh ( 1 ('1~ rrlodule)
f-rOC1,.~m
to O"'OdlJC:~ I 1St I no s
1 ('C ( I ()~) m('\("tul~)
1 ()tJC ( 1 ()P m("J"uI '=?)
LroJO. ( J nP ,.,onule)
LI-'C ( J ()~ mOdule)
LLTO
ioj
L TO
LLTC
d.i3
.L TC
l. ~C$J P(;
LM~~~Y
IhJ
37
LM"..
lhe;
f,7
MOr."'lJl~)
uf.'
U.t"t~
hC,
LMh'I.JCf)
(I
(J.,.,i
LLj.oIO
LLt-lC
11
( In~
mOdul~)
( I f'lP "'ooule)
r.-1i'1S t C'>r PrOQr~""
~,~t·.,~y
( I nf.J m.o~u 'E-)
fo.lN
( 1 ()~ !""IOClLllp)
~"·"I.oiC': u ( I () j.J mor.!u Ie) .
1-4
~at:1E
LMNRIF.I
LMLJXH
LPPO
LPPC
LPFotO
LRPO
LRPC
LSVNCD
LSVNIfi
LTA~H
LTSA
LWSPRG
I.Et:J{lII::t
101
65
10
&9
5
9
132
197
328
15
A257
84
~OQUL.E
MNRIH ( lOP mOdule)
( lOP mOdule)
( lOP mOdule)
( lOP mOdule)
( lOP mOdule)
( lOP "'0 du Ie) .
kPC
( lOP mOdule)
SVNCO (lOP mOdule)
SVNIP- ( lOP mOdule)
Tf:SGH
(lOP modu I e)
System processor
wa,..", sta,..t proqram
MUXH
PPO
PPC
PRO
RPO
Aooro)(imate Total 24987 Disc blocks.
1-5
PART II
INTERNAL MAINTENANCE
SPECIFICATIONS
TABLE OF CONTENTS
.... ..... .... .
.. ·...... . • .1-2
............ ...... ·.... •·.. 1-2
·.. ·. ..... · ..• ·1-3
INTRODUCTION •••••••••••••••
Hardware Configuration ....................... .
Memory Map· ••• ·••••••••••••••••••••••
MASTER PROGRAM
Introduction.
..
•
Conventions for use of Id ·Records ••
I/O Configura tor Methodology.
Id Records ••••••••• ; •••••
..
Master Tape ••••••••••••••••••
Patching the Master Tape •••••
Loading the Master Program on a 2100 based system •••
.. ... .. .... ....... ·. ·.....·.·. ..·..... • ••.2-1
2-2
·...
·..
·
..
.2-3
·.... ·..
·.
2-5.
·. ·. ..
·. .. ·...··..•••
• •• 2-6
... ·........ . ·..
.2-7
LOADERS
Loaders •••••••••••••••••
General Description.
System Update.· ••••••
Mag Tape Reload.
Disc Re'load •••••
Access-1A Upgrade.
Disc Bootstrap •••••.•••
• •••
Sleep and Hibernate.
System.and Feature Level Codes ••••••
Patch Date Codes ••••••••••••••
Selective LOAD/DUMP/RESTORE.
Loader Routines ••••••••••••••••••••
Warm Start Program ••
System Generation.
Disc Reload •••••
Mag Tape Reload •••••••••
System Update •••••
Disc Organization ••
Disc Error Routines.
Cold Dump Program •••••
Magnetic Tape Format ••
Sleep and Hibernate Tape Formats.
Dump Tape Fomia t •••••••••••••••••••••
·. ..2-8
......... . ..
·.... • ••••• .3-1
3-2
·
..
·
.
·
.
. . . . . . . . . . . • . . . . 3-3
·
.....
...
·.... •.••.•.3-3
·.
3-4
·...
.3-4
·
..
·.
.3-5
·.....
·.·..........
·. .
... ·..... ..3-5
·... · ...•........•• ..3-5
3-7
. •..•. . 3-7
.
·.. ...... ·......
.... · ...• •••••• .3-11
3-17
·
....
·
.
..... ..... ... ·. .. ·. • ••••
3-21
• •• 3-22
.3-23
·.....
·..... . . • .3-25
·.. ··.... ·. ...·... ..
.3-26
.
.
..3-39
....
·
.....
.
·.
..3-44
··....
• .3-'49
·....... .
..
.3-50
"
i.
~
• •• 3-52
OPERATING SYSTEM
Scheduling •••••
,
Communications.
System Modules.
Disc Driver ••
System Console Driver~ ••
Processor ,to Processor ••••••••
Processor Interconnect •••
System processor to I/O processor.
I/O processor to System processor.
Power F ai lure and Reco'Tery ••
System Tables ••
Directory ••
Direc ••••
Id Table •••
Idee ••••••
Swap Areas Table.
Ad t ..' ............ .
Locked Blocks Table ••
Fuss •••••
Comtab1e •••••••
Loggr •••••••••••••
Teletype Table •.
Equipment Table.
Master Segment Table.
Muerto ••••••••••••••••
Moving Head Disc Table •.
Device Table •••••••••••
.
.. '.
.. .'. '. ... ..
.'.
'
'
..
..
BASIC INTERPRETER
Notes On Basic.
Syntax ••••••
Phase II ••••
Compilation ••
Va1ue'Tab1e ••
Decompi1ation •••
PRNST •••••
Execution •••••••••
Main Loop •••.•
Statement Execution ••
LET ••
IF ••••
GOTO •••
GOSUB.
FOR ••••
NEXT ••
RETURN.
INPUT ..••
...
..... ....
·..
..
. ....
ii
..4-13
• •• 4-26
..4-32
.4-46
• •• 4-47
.4-49
.4-50
.4-50
..4-52
• •• 4-52
.4-52
•• 4-53
..4-55
• •••• 4-61
• ••••• 4-62
..4-69
• •• 4-73
• •••• 4-74
·.
..
..4~10
..4-11
·.•••.4-71
4-72
•••
,
.4-1
• •• 4-5
.4-6
.4-6
· ... . 4-8
·,
·..
.. .
.5-1
. .... . 5-2
• .5-2
• .5··2
.5-3
• .5-4
.5-4
.. •• 5-5
'•• 5-5
• .5-5
.5-5
..5-5
.5-6
'•• 5-6
.5-6
'.. 5-6
.5-7
• .5-7
BASIC INTERPRETER (Continu~d)
ENTER •••
READ •••
LINPUT.
PRINT ••
.....
PRINT USJ:NG.
RESTORE.
MAT ....
".
END •••
CHAIN.
ASSIGN ••••
SYSTEM ••
CONVERT.
LOCK/UNLOCK.
CREATE ••
PURGE ••••
ADVANCE ••
·UPDATE •••••••••
IMAGE, COM, DIM, DEF, DATA, FILES, REM.
Formatter •••••••••
Error Routines •• ~
BASIC Core Maps •.
Syntax •••••••
Compilation.
Value Storage Allocation ••
Execution •••••••••••
Internal Representation ••
Variable Operands.
Constant Operands •••
BASIC Operators ••••••
BASIC Statement Types.
Pre-defined Function Table:
Extended String Representation.
Examples ••
Symbol Table •••••••••
Files ••••••••••••••••
File Table Entry (ASCII files)
File Table Entry (BASIC files)
File Table •••••••
File Contents •••••••••
BASIC Formatted Files ••
Update Last Changed Date Routine ••
Run Time Stacks ••
Return Stack ••••••••••••
For Stack ••••••••••••••
Operator/Operand Stack.
Language Processor Tables ••
Flow Charts
Syntax ••••• '••.
Compilation ••••
Decompi1ation.
PRNST ..
SSYMT.
.5-9
.5-9
..5-9
.5-10
.5-11
.5-11
.5-11
.5-13
• ••• 5-13
.5-14
• .5-14
.5-15
..5-15
•••• 5-16
..5-17
• ••••• 5-17
..5-17
..5-17
..5-18
..........
.... .. ...... ·.. .". '. '.
.'. '. .. .'. '.
.. .... '.
· .. '.". '. ..
.
.
'.. '...'. '.u.".. ".
... .. .
'
'
'
'
'
.
... ... .........
·.
...... ·.........
. ... ·. ....
., ...
'
~
~
....
·.. ....
..
~
... ...
·.
. .. .. ....
·.
•
. ...
iii
.5~19
., ..
·..
•• 5-21
• .5-21
..5-23
..5-24
•• 5-26
.5-28
.5-28
.5-29
..5-31
.5-32
.5-33
.5-34
•• 5-35
·5~38
.5-39
••• 5-39
.5-40
•• 5-41
.5-41
.5-42
.5-46
.5-47
••• 5-47
.5-48"
e •••••••••••••
5-49
.5-50
.1
.1 thru 4
.1
· .1 thru 2
.1
BASIC INTERPRETER (Continued)
ASYMT ••
RSTPT ••
ALCOM.
VALUE.
Execution.
LIBRARY OVERLAY REGION.
User Overlays ••
Append.
Assign.
Bye •••••
Catalog.
Chain ••
Csave ••••
Delete.
Device ••
Directory.
Echo ••••
Dump ••••••••
Execute •••
File Command.
Files Statement.
Get •••
Hello ••
Purge ••••••••
Length.
Library ••
Group •••
List/Punch.
Load •.••
Message.
Name •••••
Create •••
Unrestrict ••
Protect •••••
Lock/Unlock.
Private ••
SWA., •••
.1
.1
..1
.1 thru 5
.1 thru 2
.6-1
e. • • •
......
. ..
..
MW'A ••••••
Pause ••••
Renumber ••
Report •••••
Save •••••
Supersave ••
Tape Mode Clean-up ••
Time ••••••••••
Console Overlays.
Announce.
Assign ••
Awake •.•
Banner ••
Bestow ••
"
.' .
iv
.
.6-2
..6-2
.6-2
•• 6-3
..6-4
.6-5
••• 6-6
.6-7
• •• 6-7
.6-8
• .... 6-10
... :6-10
..6-14
.. •• 6-15
.6-17
.6-18
..6-20
.6-21
.6-22
. .6-22
.6-22
• •• 6-23
.6-24
•• 6-26
.6-28
..6-28
• •• 6-29
.6-29
.6-30
.6-30
.6-30
.6-31
.6-32
• •• 6-32
.6-34
.6-35
• •• 6-37
..6-41
..6-42
.6-42
..6-42
• ••• 6-43
..6-44
..6-44
..6-45
LIBRARY OVERLAY REGION (Continued)
Break ••••
Changeid.
Copy •••••
Hibernate ••
Divice ••••
Directory.
Dump •••••••
Disconnect.
Kii1id •••
M1oek ••••
Mun1ock •••
Newid ••••
Supernew.
Phones.
Purge ••
Report ••
Reset •••••
Roster ...
RJE ••••
Sleep •••
..
...
'
....
Status ••
....
. . . ..
v
. ..
· ..
.6-45
..6-46
.6;..47
.6;..48
.6'-48
•••
• •• 6-49
.6-50,
.6-50
• ••••• ·.6-51
.6-52
.6-52
• •• 6-52.
• 6-53
.6-53
.6-53
.6-54
•••••• 6-56
• ••••• 6-56
• ••• 6-56
.6-57
..6-58
.. .'. .. .....
.. . ...
....
...
·.
..
.......
.
,
....... .
....
..
INTRODUCTION
The ~OOO System consists o~ severat
seQarate programs wh.Ch are run on two processors. The 1/0
Processor Pro~ram
resQonSlble for handling ~tl multiplexed
1/0 ~rom user termlnats. f~r I/O· to optional non-shar~able
dev.ces and for remote system data· communications.
.
The system conta.ns the BASIC interQreter. ex.cut've~ and library
routines and runs on the main processor. The Loader, Which also
runs on the main processor,
responsible for generating
'nttial systems, backing uP the system on mag tape, reloading
the entire system and user library, and selectively reloading or
backing UP users' ',brarles. The Loader also contains the cold
dump routine whiCh isa used to dump the contents of core from
both processors, as wei t as selected portions of the disc, to mag
tape.
.S
.S
Hardware Conf I gurat ion
I.
SYST£M
PROCES~O~
.. -..... -.. ---~------ ..
10-11 Processor Interconnect
12 System console
13 Time base generator
14 FIrst diSC
11-20 Mag tape (can OCCUPy·any unused select codes)
II.
I/O
PROC~SSOH
.. -- ....
A.
-_ ..
,..
..... -
See the operator's guide (22687-90005) and I/O
processor I~S for details.
1-1
~
';V
MULTIPLEXOR
I
I
t,
I
/
I
INTERCONNErR
1£
......
I
I/O
;PROCESSOR
I
It:
1/
I
SYSTEM
PROCESSOR
I
I\.)
MODEMS
DISC
STORAGE
~
~
PHONE
LINES
-
AUTO
DISCONNEC···
. DIAGRAM OF S:'
;M HARDWARE
/
DISC
-
\ STORAGE
\
APPROXIMATE:.
OCTAL
LOCATION
0
Interrupt linkage ana untnittaltzed system
variables
100
Equipment tabte
200
Constants and system variaoles
User
1231
Registers saved by clock
LIBUS
1235
User swap area and system library work area
(10240 wordS ~rom cOOO to 25777)
24000
For disc-resident salvage routtnes
26000
DiSC
27700
Device table
30401
IDEC
30451
DIRe:C
31571
ZOISC (disc driver driver)
31605
BASIC
54600
Formatter
57414
Power
60000
System conSOle driver
b0447
Teletype tables
62641
I/O processor communication drivers
64000
Magnetic tape driver
65417
SYstem
70000
Scheduler
71200
SWAPR
driver
~al I/~estart
~al
routines
lure. retry, and salvage routines
1-3
L I I:H-'" A
table
71&10
Comm~nd
72242
System
7~UUO
System I
'Nor'dS)
.,., 0 00
Cold oump
libr~ry
ibr~ry
1-4
subroutines
proyrams swap
dre~
(~l~
I•
I NT~ODuCT ION
M~ster PrOQram (M.P.)
supervtsps the qeneratlon or reconfiourt'3tion" of Access Systems invoklnQ the desired con~lgurator
(loP confiqur~tor or TSH SYstem ~Oader) and providing them Njt~
uti I ity services. The M.P. Is hOotstrapoed into the System
Procp.ssor (SP) memory Initially from the Master TdPe and thereafte~remains reSident unti I
loadlnq of the SP program. Since It
Co"tains drivers for t~e system console and magnetic ta~e unit,
the ~.P. IS stored onto the disc along with the T58 System Loader
so t~"t it can be recal Ip.o ~or servlcp. during system shutdo~n.
T~e
Intended to be co-resident with the M.P. must not al"ter
the following areas of memory durinQ their execution:
Proqr~ms
2-7:
30
un -"'7 (~f:
2000(~)-3777(R)
:
MAGSC:
Ioentlcal with th~ vatues used by the TS8
System Loaders and the TS~ System Progra~
(except that the latter ChangeS location 4 to
enable powerfall reCOVery).
M.P. temporaries and I inkaqe locations.
~ontalns th~ M.P. code and system console
buffer.
contdins thP"magnetic tape unit select code and
System console type. This corr"espondS in
location to part of tne SP crogram'S equipment
tdble and will be In the range lOO(b)-177(8).
Add it I ona I I y. a Cd I I to the • find -' d' rout i ne (..158 758. I) w i ~ I
use d buffer orlgined at 300(8). potential ty extending to 477(8).
Complete safety c~n be ~ssurp.rl bv uslnq only locations
lO(A)-27(A). lOOO(b)-1/77(~), and ~OOO(8)-77b77(8).
Po orooram
is inVOke(1
loaoed in response to tne "LOAD WHICH MODULE?" ouestlon
by ~ ..JSIj 4UOOf.'. SuCh a oroqram can returncontro. to
the M.P. after completion with a ~MP 4000~,I. Certain errors
detpcted by the M.P. wi t I cause It to rewind tne Master Taoe and
restart Itsel4= with the "LOAD wHICH MODULE.?" Question.
The fol lowino services
1.
2.
3•
~rp.
crovlded by the M.P.:
M~qnptic tape unit rlriver
(see' Isting for cal I Inq seQuences)
-tnvokpd bY a ..JSd 77~.I.
system console orlver (see I istino for c~1 I In9 seQuences)i~voked bv a ..Jse 7b~.I.
• Fin aid r" e cor o. 0 n Mft S t e r T'" e e - i n v 0 K e 0 0 y a ..J 5 fj 75 B • I
with tne io number of the deSired recoro in (AO and zero in
p.:q _
(A -1 in (El) is used under special circumstances oy the
In~ conflqurator only).
MOdules should assume that only a
~-l
4 •
sir" C I e S Ii? cup. n t r ~ I ;:) ~ SIS.... ; I I .., P. mn d r" t /"'t r () u I'J "" the Mr3 S t eo r ,~ 0 I? •
' I.' E' ~ {) a CI r t a r (,;' c '- r ,."
- i n v o·q. . d by (Ii ...I h /4 r:; • I * r t P"\ c=J b u f fer
':''''O'''~:SS
tn (r-').
"I"'~ '''''.'''. Io' i II dp.lrve'" thP. next record fro",
tf"\'? ~·\~stpr
T~oe 1d' rt~corc:l~ ,1rp. riF.:'leterj fro", th~ strea" of
rpcordS ~rl Ivproc.
T~ls routlr"e ~r~suocoses ~dJust~~nt
of
t ..... · rr:bOnl?tlC tdPt,: ny somp orqviOll.~ rnvoc:r=ttion of 'tind in
r f" C'" 0 r C'I , •
T r. f ~ r ceo r .:~ ~ t I" lJ c; r en ri Cl reo res u"" e r.:1 t 0 h a v e bee n
n~npr~t~~ Oy
~n h~ A5s~mcler
~n~
thUS to oe b4 or fewer Nords
in I~nnth~
uoon r"turn (A) ""ol~s thp r~corrl 'enoth;n
npoct IV~ \l'lor'.1S or IS 7corC') I" rin f.'nd-nf-f I Ie occurred (the
r I') uti r', ~ C" I.J to", " t r c (:, I I y .~ A C K S 0 ~ C P. 5 0 V e r t n P. F. () F. suo S P. 0 uPon t
r...:a I 1 5 .".' i l l ~ I~ r u r r: «(l) 1.1 U n t I I • fin d i ('] r f· cor d " I SUS Po r1
t:,:"'
c' (,. S i t ion t ~ ( t Col L"'I f.' t () ,.:. n ? t h d r ~ i I (. ) •
C n e C K S U:'Tl S f c r bot h
c:
=
~
rr.ol('jc~t~r'le
.~rlc,
. . . ,.. r c"
L C C ,:0 t
.~
'N ("\
r c
~
I/o.
I 0
r
~
r I I
., .1 t ' n (,)
t c r H n c ~ Cl
p"\
')":'H:,r~tlon
h.
~re
cr"If:c-t?·
,~It("r
I t oS nf'srrf.'o.
frc.Hl1 .:::" 'rE?~d Mara record' req~est (...ISo /"tj"l) ..
''''c-r.-t ior' Il~ N' II contr.'.n fA COOy 0+ the r,uffer address
""oollf.:n In ('-\) lvtl"'\1'l cc-Ile,..
c:;ince thIS NOrd IS reset
lNith F.'rCh C~JII, r~lC)f:lU'A'S c~n fIIlte'" I t (.ter axa!'l'lPle. usp It "3S
~n Axtrac:tlon D0lnter.
A~Vdnr:lna
It ~ft~r 10~~lnq e~Ch word
t .... p
C'
f
r
t'~ cor
r:~r'
r f' ("" Q
£:)
S t r r t:: t (=I .... r' (> r'
rI)o IJ t ,.. f' Cl f ("I r
str~tpQv.
f.
I I t'
1)
+I
r,., ,.. (" rj ( " ; ) .
( ..J ~ I.,
r: •
( r:> r v n t
.",-){ I "HJ""
frp.~IY
rf'tllr~
Atter
TJ •
A•
e:n<;alut(:l r'~("~rds
t P"\ 0 C,),.. I'j c- ('. S S •
r' l
Qftpr return frcm ~n .nout rp.ou~st olrr.cted to t~e syste~
c()nS("Ile. loc..·...,t Ion If!t~ .\At; II cnnt~ln "., chcarr-!cter oOinter to
t I'" (? r (' S c· c '"' ~ P f) t r i ri'J (I) t 0 .r ~ c: h c=- ,.. ..:. C t p r S t 0 I I ,,} wen 0 y ;,
<: c:'i r r • ~ C f' - r P. t ' .. '" r' j •
.:.:. Inc f' t his IN 0 r., I S r f+ S P. t
Ii i the ~ c h c::=t I I ..
"""'''''ule~
'I.
!"") ;.)
p
..,
n C .'
t0
t'l r ':'1 c)
:~
t~Plr
r\ I I I t . ,
IJ 1 I
~
C nlJ
II ~ •'\
I
t' ; (') n :
'"' I t
,''; 1 S C
I"
Ic
fit..;.
tl)r
'9
rev
~
t h 'S
!oJ ~
cor r- ~
Of
n Io?'
flJtlJr~
C
c.=-' I t o rOll t i
InC" ,'n ; 0 n •
S
(:,JrVf"nt 10nS
tunctlO~lno
I,~ ::i
er
~
OlJt I I
t~r
n(~~,
h~rt'?
~~st~r
C ('l n SIS t
P'r'\
r'I e
r'ire
'f
I nd
i
0
not
co~.~~uraticn
too" r 0 a c ....
'#II
i t h
cr.f""Itlnc~nCles.
t
t t ~ p , , ~ c:; t p r ~ r ':' ~J r c:- rn an ':1 t nee n n f ; d u,.. eo
'.1\ 'i "" ('I U 1 . 1 t""I .'-=! V P. t .... f' f 0 I J. 0 oN j n q tor mti t:
F i ,;~ i 0 r e c "r -!.
(i n P. ,., r
;:j 0 r r
I"j ~ t e.
c,.. 0 I J t:'I S (-'1\ I I ~ n S () I ute 0 r d I I
(~ .. C f.:'\ .j
f I I '" S
1 (IP or n "'l r'
r)
i)
tl"'l"'1
r
~)( I
IT'
•
t (: r
I .:"1" ".:.
tut
for
C")
~ t·
r
~
i~ ,r,
Inc,;.:: t
~ I
C' I:'
C': )
I- n,...
C'l )
~'f""I0-~;" - t l
I
~~
r
~
I 1') •
cor 'i •
I p :;'''r
to(.
2-2
2)
l~e
a)
~)
c)
A.
tape form~t (reCOmmended)
Mas t e rid r e cor d (i d n u'm b er i sO).
o~e or more data oroups
In ~scending Id number order,
(bot~absolute and reloc~table data groups c~n be
p~esent on the patch taee).
Ena id record ( i d number must be ~S535 =177777(8».
~~tCh
1)
2)
3)
c.
configured lOP program FI Ie must have the format:
File 10 recoro (td number is bSOOO(lO».
o~e or more date records
In a format suJtable for
transmission to the lOP's protected' loader or
no recordS if no confiqured lOP program exist~ on
the tape.
End-of-fi Ie m~rk.
DatCi oroup format
1)
Group io record (hit 15 of info word = 1 if NAM
record fol lows. U otherwise).
2)
None or more rlRta records.
If the data group is
r~locatab'e.
the recordS from one complete program
unit beginninQ with the NAM recora and termtnatlng
with the ~NO record; if the data group is ~bsotute,
p.~Ch recorrl
is in tne standard aosolute btnery form.
Thp. use of id recordS for relocatable mOdules I s straightforward.
Th~ a')s~mbler outout 'for 'eaCh separately assembled proqram unit
is oreeeoeo by an 10 recorn, formino a data group. Such a group
Is ~ co~~lete suo~art of a patCh t~oe or ·is combined with otner
qroup~
into ~ fi Ie on tne ~aster Tace.
.S
The use of id recordS for absolute mOdules
somewnat ~rbttrary;
the numb~r and ulacement should be Chosen to facil It~te generation of correction recordS on a P~tck t~Pe.
ld recordS can oe
conveniently generateo as oart of the absolute dssemoiy by sltuatina them just crior to e~c~ ORG Osuedo-statement of the program
crocer (i.e •• Just oeforp. the ENU statement). Of course, e~ch
~rouc Of absolute reCOrdS on a catCh t~oe should be preceded oy
~n
irl record to indicate ~here they should oe merged during
Qen~ratlon of a new
(I.P.. p~tChed)
Master Tape.
III •
1/0
Confl9urator 4ethodo'OOy
To confiqure an TOP croaram:
1)
C:~I t 'find id' routine (..JSB -{:'8.1) with (B) U and (A)
Id
numher of stanoaro modules file (20UO(10».
2)
R~ad the file sequent ietl Iy by calls to 'read oata record7
(JSB 748.1 With (b) - buffer dddrpss) untl I the end-of-ft Ie
is reachPd «~U - 0 on rpturn).
=
?-3
i-Iosition tnr.' ~oster T~of' to tl""l€' oot,onal mOdules -File by a'"
J c:; H 7 "l F:h I IN i t h ( tj ) = CJ MnCl ( A v
0 U (j ( 1 () ) (i tj n u rn 0 e r 0 f
0ctio~~1
mOdules f, Ie).
'""ean the -File seovnnCialtv oy calls to 'rer!Jd t'r13ta record'
( ,l:-:i r, I .. H.. I wit h C t') = h U 4= f P. r n d C1 r ~ S s) u nt, l e i the r the
pnn-of-fi In is reeChPO «A) - 0 on return) or ai' desireo
1)
= :.;
k)
~Odutps
If
~
h~vC
been
rp.~c.
cC"nf, ourF'':J r:CCy cf
M~~tp.r
cont,nue
T~cp.
tl"\€'
~jth
10F-' oroor,=,'T'I is to oe wr i tten o~
steP ~ bPlnw.
nt"erwise oroceed
the
to
St(':lO 4.
'"' )
P ('I S i t i C'I n t n c ~, 0 s t e" r ,.:II t; f' t o t h P. Con f i 0 u r e ~ 1 ') P f i
bY a ..J S !;
7 ~ • I 'Ir i t n ~ U = - .1. ~ n r1 ( A ,J .;: b :, U U 0 ( 1 () ) (, ri n lJ rT'I t) e r 0 f
Ct:"lnf., . ,ur~(j I') ... + " ... ).
~)
";rit(.' th~ c:.)nfic:tur(;" J(,~ oroQr~,., usin,) o,rect calls to the
m ., (J n (, tic t ('! 0 I.) C'r i "~r
( ..J S .... , 7":( t 10 •
""" e f. 0 r e ~ t t Po ." 0 t , n 9 t 0
'v r I t f' (,' l!'t r:.... t'"1;; t ere c: (,; r ('f. c: h P. r. k: t h pen c- 0 f - t ,=, 0 e f' a q
(7 :i 8 • 1 ) •
I 4- ,t i s non - :': ( r c • 's S l J P a r~ ~ C k' f I I P. / for'll fj r d r e cor 0 r e Que s t
t fj ,. II r Q P t "" f'? + I I e AI r , t: t E?' ,.. ~ 0 f. !III r CC.C
b!lCKf;le
'e
eLf".. 1 "'1"1
•..JS h '1 -,"; • 1
OCT
for~~ra
on~
r~coro
reoupst ~ctior)
(oositlonlnq r0oupst)
thPse returns
will not ne tal'(en"
4
,.:pp
rhen i ss ~e "'! c~ I C"Qnos t 'C f.'t"'jd oroc~ed to s teo -, be low.
"':') t p. :
r 4= t h'~ C ",ecl< ; or e .",r i t e r i n<":l I s I'!larj~ by a stat us ca I
tn thp dr I Vf':r be tor"r.> o(')r fO~ no steo
tne COd i nt;l
the
"., .:" s t (' r Pre 0:"" ~:!"l
I I ~ I I 0 VI' rj I s r." 0 u'" tin 9 t '"' P. t doe d n ti r e "'0 u n tin Q
It.,. I t h
~ .,. r' t a r I ,",.") •
to r f' win a c; h 0 u I d t h en b e iss IJ edt 0 en~u",p.
t;:aOf.' IS et
lo..,·.,.nClnt.
of
'='.
w'
T)
'.II.'rltf' fin p.nn-ot-filf!' "'(=Irk
(thiS is to OP done ev~n i f thP
r-nCl-of-tAD(" .. Iolot IS spt) ano h(l'lCIofSpnCP. over i t .
(A) = ~
cnnvenip.nt Id nu~~~r (th~ id nu~ber Of the 10P con-Fiaurator'S
("Inn Id recor'j, presu"':l.=.blv !;I"f'1(lU). will 00 nicely) •
.. ~ )
0.( P
1)
t
II r f"\
~ositlon
1""".1
?)
~)
tv)...... '"
tnt;... t?
tne
With
t~on
(n)
t h
to
= -1
~
..J fvo """
tne
~r.r:I
'" () 0 U t-1
• I •
Con~ioura~
(,q
10P
= l'-\"')uOJ(lt)).
f' Ie by a JSd
Re~d tne .. , I E;' us, nr d, rect CPt I I S to the meqnet, c
tepp
rriver (~Sl- ·I(~~.L)." t\fter the en,..,-ot-file m~rK is r-ead.
nnCk'SPcice over i t .
J f no rr.H:oros were read, tnen no
conf,ourea lOr- oroqr~m E''(tst~ on thP. Mdst(llr TdPe: infor",
t 1"'1 P 00 er ~ t or •
~ruositlon t~e t~CA hv a JS~ l~H,I with (~U
-1 and
(Q)
-= i:. ccnvo"'t)nt ir:1 nUf'lt'ler (e.Q • • 1"14'1(10.) ~s In steo·$j
=
CitlOVP).
2-4
~eturn
4)
I V.
to
the M.P.
~ith
a
~MP
40008,1.
RF.CO~D~
Ie
An Id record i s exactly five wordS
long and has the
~o
I tow i ng
~orm:
Yoord
word
word
word
y.;crd
o:
1000d
1:
C'OOl~
2:
10 number
Info wor.i
Checloo,-,pnce of recoros in
t=I !? S ('I I u t p. (j i ,., ~ r ' I t O r "' ci t
( rHJ fI'll.-\ P ,. 0 f f1 e t n W 0 r C1 s. rn e ." () r y 0 r j Q in.
"1~t~ .... or~s. FIno Chec~sum).
Th£? 'VI.P. must be IO.::l<:~e·d fro,," mEilc
tAnn: t"'f'r~c=!ft'er I t f.JrOVI"'~s t"'~ t~ci I itl€"s tor loadine thE' CO".
t i ~ l Jr :7:1 t lor. moo U I 1;' 5 •
1 ~ E? I tit S t t; I €' i S I ri I tin I I v e ~n c t y e )( ceo t tor
t~r~
file' iC"'l reC(OH":-1.
It enn be overwrittp.n "'Itn n confiaured In""
orC'Jr.=tr." thrOllcr'\ rHI oCltl')n nf thn in.., conf,(Jurertor ..
Tna middle n
fi I~~ c:;rp th£" I')t-J cont ,r:ur~tor. InO proqr:::t" f'llo.:hJleS I Wdrmstart.
10''3·'''1''''''5, thr-> .oCCt:':i~ SystP.r,'\, ~nd t~~ fi Ie conversion mOdules.
E~c~ of
tf""se fi Ic~ COnsists nf ~ fi I~ i~ racord, bn~ or more
'jnt~ ,rOI.H·S.
an~, nn uc:\tloP"\~I. but rpcolTt'TIenop.a.
end td record.
A
d~l~ ~roun conSists ot ~ aroup
I~ r~cora fel lowed 0'1 a relocatabln ·."JrOlJt> (NAP.' r-f·corO t~rouon EN£) rE'corn). or sec~uence Ot
.=. ~ SOl tJ t f:) r" I n a r 'If tor mc4 t r ~ cor d s, or ~ nul I r P. cor d set (I. e •• a
arou~ recorn mdY
~~
ful lo~ed ~y ~not~pr 10 recorc or the fl ID'S
p.nCl-O~-" I Ie me-r.-<).
~ I I
I,., r(:'cordS h=-v() the same t ormat. the
~~~ti~ctlons
~~ove ~r~
tunctio~~I.
fpch ie recorc cont~jns a
un i v lJ ~ i n t r c ('> r (I d ) ~ hie", r'I u 5 t '" e Cl r e t=3 t e r t h ,.~ n t ~ E? i d 0 f the
p~v~i~~1
Iv orec8d,n9
i~
r~cord.
2-6
l~e
I
Oc~
t db 1 e
F i .1 e
Absolute Fi
F'i Ie id
Record
r I Ie Id
(,roup Id
Record
Group· id
Record
NAt-A
Recor d
Record
FIRST
l)C'tta Group
•
•
•
•
•
Record
•
•
•
•
•
Absolute
, Record
(,roue id
Recora
Group Id
E-ono
NAM
~ecord
Last
Oata Group
Aosolute
Record
•
•
•
•
•
•
•
•
•
•
~ecord
Absolute
Record
Eno Id
Record
End id
Record
End
EOF
VI.
ABSOLUTE
Record
kp.cord
~atchlnQ
'e
EOr
the Master Tape
Master Proqram does not support catching o~ modules'uslng
a oap~r tape containtnq catches. However, the Master Tape can
be rlirectly patChed in the fo' lowlnq manner.
Th~
2-7
ThA alb 4dster l~ce m~Y np ~erqen with ~ P~tCh taoe'cr~attnq ~
n e IN Nt ~ s t P. r T e p'e • "" s Sum i not h ~ t t n epa t c n, t" p e f 0 I low s the
conv~"tions
for id record~. the n~NIY created ~aster Taoe wi I I
cont~in the new PdtchCS.
Hence ~hen any mOdule is IOdrlen tne
o~tC~AS
~~vP atre~oy.~p.pn
incluned.
Note th~t the sOftw~re to
do this ~s not' part ot tne ACC~SS syste~ itself and the ~~ster
~roar~m c~n not ~e PdtC~~a as
I t does not cont~in an 10 record.
'it IS oeSlreo to use the "4~ster t-'roornrn on ~ ~l\JO baseo
for ~~~tever re~son: system rr~Sh. ch~n~inq lO~s. system
etc. the tot IONlno prccPdur~ shOulrl be fOI lo~e~.
Wh~ne-v€"
systr~
uo~~t~.
Thp. on)E'ctive IS to rEt,.,rl th~ r1aster ~rO·.lrnrn .ro'1" lldO tace uSinq
the ~~Q t~ce haotstra~ ~ontH.n~d on o~c~r t~oe.
Tnis oootstrao
must ~e cross-loddCd from the Io~ to the system orocessor usinq
th~ ACC~~S cross loeoer i.nC9 thp system 6rocpssor hdS no Dnotor e.,d Ar •
The cross
from sceclal ACC~~S ~asic ~Inery
systpm orocessor. the In~ must oe
ctOD~p.r(~ wit'"' t~R crossto~orr.
noviouslv t~e !O~ must be
relo~opn prior
to r~lo~olno tn~ svste~ orocessor.
Lo~~~r.
T~~
IO~der
~ust
to
~once
he
rcl~~~
re~C.
t~~
teop oootstrep. oncp ~ross IO~de~ Into the syst~m
~~y oe used t~jcP.
once to lOAn or relOdd the lOP
cnc~
to rplOdO lne systP.~ procp~sor.
~~a
O~OCA~sor.
~nrl
clOu cross Loaner
Th~
th~
Cross L060cr
~~c~~s
r."'os~
LO~der/Pootstrap
In~'s
"':";r'I-"rv
p~ppr
t~~e
rpSidOS on tne first f i Ie o. the
Thp. Cross LOdoer IS re~d from
uSlnc t~e ~CCES~ protected rleSlc
bjn~ry
p~o~r
rc~~pr
t~pe.
LC"'r=:tder.
Onco tt'le cross Lo~oer n-:'iS hPp.n rf?"'ci into tl"\F" IOP's rnemor,y the
contents of the A a~d ~ r~aistcrs s~ould not be ~Itered ~s they
cont~in th~ splect COop~ of
t~e PdPer
t~DP re~der and the
interconn~ct Kit.
T~e ~CCt~~ orotected
lo~derconveniently sets these
rea.sters for tl"\e tross lo~~~r.
To cross
(or ~ny orcore m ). st~rt tne syste~
(rp60lnc frOM tne interconnect k i t ) .
on t~~ I0P. ol~cn tt'le prooram In the Dhotore~oer and set P = ~
r!lnd oress "run". ;;.. nolt 77,... on noth orocesors siqnals t9 successful cross lo~o.
Tne Lross Lo~~er ~~y oP restarted ~fter ~ h~tt
77r;:., "'v Simply DreSSlno "run" It it is dPsiren to cross lo~n
(i'nnt"'''''r· troorern.
IO~d
procpss~r.s
thA
Doctstr~n
protect~o
lo~~pr
2-8
clOO
~dq
fdPe 800tstrap
The mao taoe bootstrap ;s the second ~i Ie on the crossloader/'
bootstrap paper tape. The cross loader sendS tne bootstrap across
thP. int~rconnec~ kit to the system processor where it 6s read ~nd
pl~cerl
into memory byt the protected loader. The bootstr~p may
then be started at either 2000B or 4000B (2000B contains a Jump
to 4000~). However, i~ the bootstrap has just been used to
relo~~ or configure the lOP it mu~t be started at 40006 the
seconn time • . This ts reouired because th8'IOP conflqurator
destroys the JUMP at !ocation 20008.
once the execution of th~ bootstrap is started. the user Is
pro~Pted at the console for
the select COde of mag tape unit
V~I id v~lues are 14~ thru 26e. '
o.
Proqram is then read off of mag taoe and loaded into
At this point the taoe is' rewound, the select of the
mao taoe is placed into bits 6 thru 11 of the s~itch reoister
and the execution Of the ~nster Pro~rB~ begins.
Th~
~~s~er
me~ory.
2100 lOP easie 8inary Loader
The lOP on 2ioo based systems contain a spec'ial ACCESS version of
the orotected ~asic btnary Loader. Consult the Loader manual for
orocerlures for loading this loader.
This loader has two stnrtlno dddresses for eaCh of three possible
memory sizes. To reaa from the Interconnect Kit. start the
IO~rler at
location X7700.
To read. from the paper taoe reader
st~rt the loader at
location x77~O.
whprp. x=7 for a 34 K lOP
X=5 for a c4K
lop
X=3 ~or a 10K
lOP
In elth~r case. succeSsful execution, ts indtcated by a h~lt 77B.
If successful. the select codes of the photoreader and the
Interconnect Kit are left In the A and B reqisters respectively.
The~p reqister settings are required by the Cross Loader.
~9
2000 ACCESS LOADERS
There ~re f~ur loaders avai lable for 2000 ACCESS systems.
The soecific loader to be ~sed dependS on the tYPe of
discs on the system. All loaders are functional I y eauivalent.
Therp, is a uniQue ACCESS loader for each of the fot lowi9
combinations of discs:
7900 only
2883 only
7905 and 7,900
7905 and 2i;83
Note t~at ~I I other combinations of diSCS on a slng'e sYstem
Rre e~p1 icity disallowed. AI I SUbSeQuent references to
liLoarler" imp I y a I I four. un less exp I I c i .ty noted.
Th~ Loader
is a separate pro~ram which runs on the sYstem
comouter.
It is expl iCitly loaded by the operator to perform
the fol lowing functions:
1.
Generate a new system from maq
2.
UPdate an existing
t~pe.
disc-resid~nt
system
~rom
mag tape.
3.' Reloao
~
system from maqnetic tape.
4.
Q~IOad
a sYstem from disc ustnQ the master tape.
5.
t)parane an ACCESS lA SystE'm to an ACCE.SS ld system.
The IO~der is implicitly loaded when the operator requests any
of thp. foil-owing functions:
6. A normal load trom disc of a Slept or warmstarted system
usino the diSC bootstrao loader.
7.
~
sleep or hibernate.
In a~dltion. the loader contains thP. movinq head disc driver
for the system. the cOlo ou~o bootstrap, ann cold dumo orogrem.
3-1
GENERAL DESCRIPTION
Thf' t..o~der oen('r~tes the systefTI tal"'lles OY ~sio(ino the
COP"'fir:"uration ootion questions.
If no opttons ~re soeciflen
th~n
it sets the ~~T to dp.~au't values:
1 diSC on the system,
~ ~i~ctcry trecK oer eISC. ~n~ 1 ID trac~.
If tne system discs
~re nxclusivCly 7~UuS tnen thP. def~ult
is 1 directory tracK
oer --iisc.
~i~c~
The Locwed Hloc~s facie is
checKeo tor lanels.
to zeros only when the disc is not I~oeled for
ooerator.Wdnts It to h~ l~b€'leo.
~re
inlt'i~lized
and
t~p
TSh
Tnn ~isc sr"~ce clalmin,') strntP.t"Jy is nS follows:
First bui Id ai,
ADT's In corl"' frolT') LOCk~':l ~'I(')CkS Tat"des.
TP"'cr" cl.::lim disc scC'ce
for" t""e system. lrJ"ls. "UTs r.rtnd directory tracr(s uslno the AOTs
in cnre. ~hlCh ~rp. then written to nISC.
{The disc sP~ce
reouirf'o Cy ~ystE;.'m I Ibr·~ry rout Ines (~nn user' swao :treas are
cl~i~pc after
the farst SysteM I inrary routine is read in ceceuse
t~~t routine
IS a t~ble of th~ lenaths of al I the system I lorary
routines. ~ccoroln~ tc w~iCh the olsc SO~CD for the I inrary c~n
~~ co~puteo ana cta.men.
Thp. TnT. ~DT ane directory
Rn""l the s",ap trc.=tc~s dre 4?.
In
orrl~r
IS
u~~d
tr~cKS
are j2 contlouOUS olOCkS eeCh
r:>IOCKS eacn.
cOl"\tloUOlJS
to mtnlmize cyl Inoer S~!tcnino. thp. fot towing ~tQorithm
for cl~i~ln~ olse SD~ce for t~e systpm taoles ~nd swao
tr~cKS:
tnp next uie~r Of ~vall~ol~ ~ISC sOdce.
dC~S not cross p~YStcat
Cyl ind~r bOUndary.
take It.
I f i t Cr 0 S s. & s rJ'" y sic a Icy I I n ~ n r t", 0 un ".'l r:! r y the n t a k e
t h ~ n t3 l( t ~ ICC ~ 0" ~ v a i I r,:, nip. "1 S eSC;) ~ c ~ W 1"'1 i Ch S tar t s .
on Ohvsicdl cvl Incer hounosrv.
~.
Get
~.
If
(' •
it
Tnl~ sIl"'Iole ~lqOrltnfTI worKS for alt
Th~
AI or
R.
tyoes.
iOl"\alE' tor oeln, ~hl~ to olJ,'d ~II ~JT's In core at 14>00\'3
e ~ c han a t 0 h d vet n em r e'" a in,., ~ 1'1'10 r y -r psi a P. n t wh i I e c I ~ i 'TI i n Q
!;Odce IS as fOllOws:
r~t
·1 ~
dl~r.
A.
/diSr.
~~C~
AOT
lona
IN or t:'I s
C~SA
(:0\
i~
OUI It fro~ Lock~~ ~Ioc~s
woros) c~nt-jnino at ~cst
",or 0 S len try) •
T.... cre-forE' er:.cl"'l Inltl~1
wordS (3 v-oros/entrv).
AIH
T~rIO
12~
~hich is i oloCk
entries. or 3d7
hnS at most IcY pntries. or jt;7
3-2
c.
cla'mina space for the System segments, the number 0+
not i ncr ec!)se because they do not have to
start 6n cyl ;ndar boundaries so that the ADT entries c!!re
either shortened Or removed. only claiming space for lOT,
AnT c!)nd dir,ctory tracks may cc!)use an increase of ADT entries
because they nave to meet the Cyl inoer boundary conditions.
The increase 0+ ADT entries is at most:
~I"\en
A,..,T entr i es 'I/.i t t
3(IOTs) + ~ (ADTs) + lOxd (directory tracks)
or 273 'Woros.
= 91
entries
D.
Hence ec!)ch ADT buffer needS at most 387 + 273 words = 660 (or
12248) wordS.
E.
PlckinQ a nice even nu~ber, mawe It 1400H wordS 'on~ each.
T~en the buffer.
lenQth .for 8 AOTs is 140008 which can eC!)si Iy
fit in memory $tartin~ at 320008.
The system Is re~d from maq tape and remains in"memory. After
tne first system. library routinp. i5 ,.eao, the system segments 1
and 2 occupyinq locations 32uOOb through 520008 are written out
to t~e disc so that thiS oortion of 'memory can be used for ADT
buffer when claiming disc space for system librc!)ry and swap
~re~s.
(The other system.segments are written out after the
COiv1f) .tab I e I s set uP.)
w~en at I the system binaries are read, the remainder of the
system is written to the diSC. Then the pre-boot processOr
nna final aisc bootstrap are written to each disc; the system
segments a~e restored in memory; the user swap areas are
initialized ana tne DATF.-TIME se~uence is entered. control
Is then transferred to TSB.
?
Syste~
UPdate
System UPdate uses only the system binarY lO~d section of the
load seQuence. HOwever instead of gener~ting the EQT. it
re~ds the EQT from rlisc.
It returns tne diSC soece occuoied
bv the original System I ibrary to AOT and cl~jms new disc
soace for the new I iorary in order to ~I tow exoansion of
syste~ I ibrary as wei I as Poss'ble savinq 0+ diSC space.
It
does not Change any diSC ere~ other th~n the system COde.
SAlecttve load ana dump Is processed before entering the
DATE-TIME se~uence.
.
Mag tape retoao rendS the EQT e,nd OIREC from the hibernate
or sleep tape rather than oelng initial ized. Also, before
t~e system is read.
IDTs and directory traCKS are read from
tnpe and distributed evenly on .disc.
r3-3
the sYstem h~s ~~en wrjtte~ to disc. tne user' jbrerY
Ie; $o~ded r::lnd stcre~ on disC dccordino to the alloc~tion'
oct Ion soecitled.
~fter
S~lective
LOAD/OU~~
seOue"ce.
It
LOed/Dumc Section.
TIM~
4.
is
is
oroc~ssed
describ~d
before enter.nq the DATF.further in the Selp.cttve
DISC ReloRds
are t~o procedures to reload a sv~tem ~rom disc.
Tne
i sex p I i CIt 'y I 0(9 C'H? d .i n t 0 IT' e 1"0 r y for 0 neD r oce d u r e
~n~
i~DI iCltly
loo~~~ for
tMP other.
T~n
latter wi I I OP.
p)(pldlned in Item he'
T~ere
, 0
a c'1f:' r
The ~~stpr T~pe must nO usp~.
If nCltM~r system generation
or Ma~ tape relu~a i~ soectfled. a disc relo~o is 'mol leo.
control is trans+er"'ed oirectlv to the section of the IO~(ier
Nhere it rpa~s the ~isc bootst,..ao end SST from bloCkS ~ ~nd
~.
After ChocKin,=" for vdlid conditions. it redds In the
system accOrding to SST. Then .It orocesses the configuration
o~tions. returns the 010 swao ~re~ to ADT. claims disc soece
for ne~ swap dreas. orocesses selective LOAu/OU~P commandS
~nd enters tha DATE-TI~E seauenc~.
If the syste~ (~S re~d
f,..Orrl diSC) is not in ~ 'slcpt' st~te. Wnrmst~rt may oe
:=-tterrlpted.
~.
ACCES~-lA
UOqrade •
...",
kno~s
th~t dur in'J ~ mF.tc] taoe rei oad
oe r~'odoin~ ~n ACCFSS-IA system.
If so. So&ci~1
prOCCSSlno )s reQ~I,..eo.
The fel lowlnq shoulo ha~a occured
o,..lor to ~ttemptln~ thP. relo~d.
1.
~pcenflqurc th~ svst~m oroc~s~or ~nn
IIO processor
n6rdware ~s reaUlr~rl.
Con + i our r:~ C:I n ~ c c p. s s 1 ~~ 1 10 Dr c c e s s 0 r •
(It "ust be
2.
r lJn", I nq • )
Th~
It
L("~AI>F.~
(I-IC(t:~~-Hq
~dv
r) urI n q
the 1TI.3 q t n (.J e ,.. flo t 0 C' O. ':I i s C sot her t t-\ and j s CO, mu s t
reconfiqureo uSIng
the' nISC commano.
Thp. 'iiffering system
IpvelcOdes are I~nored.
Aftp,.. the opportunity to oerForm
LnAD or DU~P commanrl~ the syste~ halts 17~. Instead of
~oinq throu~h th~ normal
~ate and time seQuence.
At this
Doint in tl~e~ the so~tware is IA (~s far ~s the syste"
o,..ocessor is concernP'd)~ ane the hare~~re and IO~ ~re l~.
Ih o,..der to I"stal I the IH softw~re. set p=~UOO~ and press
run.
The I~ master tnop should hp. tOMoeo ~n~ a system
ucnate speclFieo.
T~is COITIDI~t~s the u~orade to ACCESS-Ih.
3-4
The loader is entered impl'lCitly tnrou9h the bootstrap
oroceolJre:
A. The memory or ~OMrestdent disc loader reads In
sector O.off disC 0 Into memory starting ~t location
20558. enter ing t.,e pre-boot" processor.
~.
The pre-boot processor reads in the disC bootstr~p
SST ~rom bloCkS 1 and 2 of disc 0 Into core
starting at loc~tion 14~~OB end jumps into It.
~nd
c.
7.
The disc bootstrap ~hen reads In the system aCCOrding
to SST and the same seouence of events occurs as out~
I i np.d in Item 4.
Sleep or r.lbernate
~or a normal
sleep or hibernate. the loader is re~d Into
Memory accoro I ng to S'5T by tr;e Sy stem I I Crary rout I ne and
control is transferred to the loC,ltder.
It first COPies the
DIkECT and E(~T to d'SC c?\"nd then If DUMP was specl-fled. It
5 t C'r t s t he mag t ape dump or ocedur e.
I f RE.LO~D was spec 1ft ed.
d disc reload IS performed (see item 4). " If no option was
soecified. it just ndlts with 778
(SYSTEM SHUTDOWN).
T.,e SeQuence of aumoinq is as specified In the sleepl
hibernete tape fOrm~t section.
If sleep, the user files
du~ped are only those chanQed since the
last hibernate; If
nibern~te. at I user fi les ar~ dumped.
q.
System/Feature Level Codes
~~Ch system ~nd
10~der
is asse9ned a syste~ level code ununiQuely tdenti~yinQ tnat system (but not. in general. differp.nt versions). ~ach time ~ system is loaded, the 10~der
wi I I ensure that it is the correct one for that system.
A.
on Initial syste~ Qeneratlon or system UPdate the loader
wi I I verify that tne mag tape contains Its system level
COde.
R.
C.
on magnetic tape reload tne loader wi I I vertfy that the
set of tdP~S w~s qenerated by its system. The only except ion -. s an ACCESS-l A UPCH" ada (s ee item 5).
on diSC reloaas (bootstraps) the IOdder wi I I verify that
the system on tne disc paCkS- is its system.
3-5
If thr system is not ~cceot~ole In a~y of t~e aoove. the
loaoer wi I I or i nt ILLFGAL SYSTEM CODE. LOAD/DUMP
AAO~TED on the system consol~. enn termln~te
'o~dinq.
The system level
~~ course.
thiS Should never occur.
COdes assiqnea dre:
?OOOC
200ur
2UOOF
~OOO
200\)
(HIQn-SOe~~)
C:::O()U
31JOO
(ootion cuu/20~)
Cnetion ~lU/~l~)
Access k~ledse A
Access Relp.~se ~
ThP 'Vi=': I ues ~re i nceoenC"~'nt
I"'J0scr;bed oelow.
J..,(IO
~uOO
bOUO
o~
thP.
feature
I eve
I
cOdes
svStPM IS also ~ssioned a fp~turp level code identifvina the level of f~~turps It supoorts.
FACh
2000C
(Hi~h-Spe~d)
2UlJ
~000F
cnotlon
~uO/du~)
~uu
~OuOF
(O~tlon
~10/~1~)
2000 Access
2uOO AcC~SS
~p.lp.~se
A
~ tJ lJ
J.OUu
~elease
H
~OUu
The ~ssumotlon is th~t ~I I SyStPMS .~i I I be mauntained as
concp.ntric suns~tS. nut t~~ SChemp. is flexible enOUQ~ to
~~rooate tniS If necess~rv.
The featurp lever cOde is
used by the loaoer to p.nsure that d svst~m is not IO~ded
with a I ibrery ccnt~;nlnc oroar~ms wlt~ f~~tures it does
not suooort. when s~lectively. losoino oroqrans and files
fro~ m~onptlc
taues. If thA t~oes were oroduced by ~ SysteM
with a "'ianer feClture Ij::Ivel thp lo~C':er WI I , or'tnt:
TAFE
()t)C)(
~AY
VS
Cnt~T~ll' ,:~ . ., t r- I ~ c:; •
If i!!'n IS pntpr-t=;". i t is pldCPci Into tne table - Cr.o I l i t !Icons truct('("1 ll> tc=tb I p l l .
I" < It.'> • < f'~ ~H" r." > I S P. n t e r fI' ('1: 5 C t t h ~ rl I r" e c tor yen t r' y • S
r pcovl'~r y + lou.
j..Ipw I n::1
t nO m,=it::l tat'"lP.
hlp':;':1 t 1"\0
I dtH'? I on IOf-!r.
'pvel Cact'.
~~~~
eve"t~
of
C'('ar-
1·r-~,t.Ov('>r-ytt
flr~t
In
e r try tor
J •
k •
If tl"\R
0t,.,pr ....
t n
f I I
Ch'.~CI'<,
t("'\
I f.
t h r:-
I. !-' t· :") IJ
,",eF-r"
c:;
t?~
In
t
UPdate
I.
ml.J != t
Ll'')T.
J.;l;rS
of-rCll"'\
th~
I"U~ r:. t'"!
unt, I
o•
W'" i
o•
\..> f? t9 ('i
t
r
~
fI
c.. f') 1/ t::. r
r e c c r-.,
tr"l('
PUP (16
I ~
""i
~
t
..=!
<.+ .... :I!rl<.·
t
~
,; ..,
I ,..
t~e
witn
nirp.ctory
,.. ( .•
r.
('0
v (\ r- po
cj.1
f I
~o
,.."J
to step ':l.
If not spt.
ISS ~ t
~o
r p t urn
onp. nt ;:;. tl''''':t~ to fInd the '.:1isc
·.... ltnOut r~r:"cvlna so~c:e foro,"" the
(" ••
..
,... t." 1
~~q,ns
r",SC
"iIE"
('ntry
alr-pc-tery
tr"\€
~ (:>
~hir.1"\
f·· •
,C'" r. f'~
tn&
ta
tor
Ar>T yt-'" t •
n •
rpcor~.
t
Ie:; not I n t '"" p (" i r- r- C t n r ''I
tnt-' "r- f!',C':ovpr y" t I fiC.:
~ntry
SPt.='Ice
r.
~
,SE;.
st(">rJ ,.,.
SD.-=j('(l
I.
did
f I ,., Cl
(';
for tl"'lis
I f.'? r f!' "1 •
tim e. fro,." In a \-:J
pet 0 r y t r
n :1'; I r. n n "
c~I I
1l11T.
3-8
COl c
to(
t:"~,
t 0
n A L;
t
fil~
~ ~.J (-?
WitI"'
~ 1"'\ (']
the
II'" I t P.
t 0
dis C
('] I Si C •
t (,)
,.. ~ rn 0 '1/ e
s0
~ C f"!'
of-
r
0 I"l
Q.
If there are more ft
w~se.
Tht1
re~.na
~nd
I~s
st~nd
to load.
by.
90
to step t.
other-
r.
Reao in one 10 track at ~ time. For each IU, read in
one dJrectory track at a ttme and compute the total
disc space USPa by that 10 ana UPdate tne lOT. enter
PLOt aqain.
s•
1ft he 1 () i s , n t .... e II can s t r u c tea I D t Bo tell, put t n e
fi Ie· into the directory and gO to step t;
ot"herwlse
to steD h.
sequence of. events for [JUMP t s :
a. San"e as ste~ ~ for LOAD/P":C;TO~E
SamE' as step n for LOAO/k'ESTQRE
b.
~c=tmp
as step c fer LOAL)/~I=:STORE
c.
Sane as step ("I for LOAf)/f,:(EST()~t.
o.
e. Same as step ~ ~ar LnA[\/~ESTO~E
Samf? as step f for LOAO/RE<;T()J.JE
f •
Q.
Reouest "ver I loy" oct ion.e
h.
~et
i.
write
J.
in one ~irectory track at a ti~e.
For eaCh
entrY. cheCk tne "recover lt tlag: if-set. read the
fi Ie from CISC one record at ~ time and write to
tape.
The first recoro.iS prece~ed by the directory
entry: the Inst record is fol loweo by an EOF mark.
If not c;et. cheCk tnl?> "con~tructec:1 10 taole": if tne
1D is in the tahle. cump thP. fi Ip to m~q taPe.
k.
uo tape
EO~
w~en
nl I
extr~
~p.win~
Ifl.
n.
write to mn9 tape.
~nd
mar~.
kea~
~n
I.
l~o~1
C .... ec~
the oirp.ctory
~Of
tne
m~r~.
are 90~e throuqh. write
tape '~Mef and EOF m~rK.
tr~CKS
~Inal
t~op..
verify finO.
Verify tdPe
~
Innpi
i~
not
w~nted
and
£o~
mMrK.
00 to steP o.
Peed in one dir~ctory track at a tiMe.
For eacn entry,
cneck tne tlrecovp.ry" f I dO: if set. re-3:i the f i I e one
recorn at d time from disc into buffer ~t 320008 and
rPRo from taoe ~nto oUffer at 5~OOO~. Verify the
contents ot r.h~se two buff~rs Nith pacn other.
If the
f I ~ q I S not set. C h e C K the It con s t rue ted I L) tab I e 18 and
.dO the same vC?rificntlon I f the I() is in the table.
3-9
c.
~pwj~n
~1.
Pr In t
tne
III)ot.. t:.
st~nn
hv.
II.
3-10
Th~S
section contains brief descriptions of some routines in the
arranged an alph~betical order.
'o~der.
BUMP
This short routine bumPs the pOinter to next AOT track in
the AOT buffer wnen al I AOT tracks are core reSident.
It ts" cal lee by CLAIM for settjnq UP pointers to searCh
next AUT track.
(See paraqraph on CLAIM).
COB
is cal led by SVSLB to claim disc sp~ce for
the system lab,..ary and swap tracKs.
It cal"ls F'SDAD to
find ~pace for I ibrarY whiCh can be allocated anywhere" On
any dj~c.
It"calls CLMSWfor cl~tming swap areas cecause
they etther start on PhYSical cylinoer oOundary or dO not
cross Physical CyCI 'nder boundaries.
CF'F'w
C~Fw
CKFC
CKF'C CheCKS for val id feature or patCh date COde. The
feature Coce on tape or ulSC Is conSidered Inval j~ if It
is gredter than the feature COde of the System. The lOP
patCh date COce Is conSidered inval id if it is greater
than the patCh date cOde of the 'Odder.
In these cases.
the"user may Choose whether" to take resoonslbi lities or
not; If not. then CKFC exists through P+2; otherwise exit"
to P+3.
CLAIM
ThiS routine finds a-piece of disc space from ADT. which
either starts on Physical cyl ineer bOUndary or does not
cross phYSical Cylinder boundary, thus takinq care of
minimizlnq the interrupts resulting from switching of
PhYSical eyl inders on both 1900 eisc and ~~a3 disc.
This~outine
converts the first 4 words of a directory entry (10
and NAME) into printable ASCII format in a specified
buffer.
The AOTs useo by this routine may be ei~her at I In core
buffer of 14000(H) wordS lonq Or on disc to oe reao in
one at a tame. The sucroutlne whjch uOdates the ADTs and
pointers i~ either BU~P or NUADT. The entry pOint Of the
appropriate suoroutine is passea to CLAIM In the word
CL~FL and CL~lM calls
It Indi,..ectly througn CL~FL.
CLMSW
CLMSw claims swap areas of 40 blockS each and saves the
diSC addresses In the table TRKTb wnlCh is written to
aisc. Before enterinq the DATE-TIME seQuence, the loader
uses T~KTB to initial ize the SWdP areas and TTV table.
OAC"
It converts a positive number of b digits from decimal to
ASCII ana puts into a j-word buffer, right justified with
leSd'ng zeros set to nul I c~aracters.
DISCL
ThiS routine provides the necessary environment fo~ the
moving heaa olSC driver and transfers inout/output/seek
3-11
requests to the actual driver.
In conjunction with the GMQ~D routi~e.' OISCl provides a
buffer tor olSe driver ~enerated error messages and
~rints any SUCM errors
that occur.
When certain diSc errors occur. OlSCZ cneCKS the disc
error .Iag L>St:.t-tZ.
1+ it is zero. it halts. otherwise it
gives control to the cal I ina olace throUqh eXit to p+~.
US~~F
is al~ays cleareo before DISCZ exits.
The D~~N routine IS us~o to insert a 12 word directory
entry' Into the directorv.
If the proper directory
track is +-ull" SUPDP IS calleo to redistribute the dire
tracks.
~ee
tMe svstem documentation for supersave for
a oescrlPtlon of its ooeration.
EOTCH
Th is rout-i ne CheCKS +-or an end-o+-taDe (our i ng M~g Tape
Sleep operations).
It is cal led when end of tape is not
allowable (before +Irst fil~ mark).
An end of tape
prints a tape too Short mess(3qe ane halt,S. Pressinq run
re~tarts the eump.
FN.lSC
~~ZSC •• ndS tMe next active diSC
~~ith non-z~ro select
COde) and returns with certain pOinters set.
FSDAf)
~SDAD lOOKS for nisc space from the ADT.
If insufficient
room in A01. It returns to P+l; other~ise ot returns to
~+2 with AU1t:.~ set to pOint to the ADT entry and A-~
registers set to the oisc address. Disc sp~ce is not
removed from ADT if DCfLb is -1 ane is removed otherwise.
ThiS routine provio~s 0 place~ox for
It aSKS for an error messaqe buffer.
or DISCL wil I print o~t the messaqe.
the
eise driver when
this routine
ilt~er
lSAOT
ThiS routine Inserts an ent~y into AUT and UPdates the
AUT lenqth ShOuld be in core bu~~er and cartain pOints
and PBrameters set.
lSAOT
1hlS rout.ne Inserts an entry Into AOT and uPd~tes the
ATD length v-ord in the E,(JT.on entry, the approor lC!!te
~OT shoulo be In core buffer ~nd certain oOinters ano
oarameters set.
LUlOl
ThiS routine performs the fol lOWing .unct.ons:
A.
b.
~eaos
boCK Into core t~e ~our system segments th~t
were overlayed bv the ADT and rUT buffers.
CMeCKs the lOP's c~te COde in al I C~seS except mag
tape reloao.
If e mag tnpe relOdO is In croqress.
the lO~'s d~te was ch~cked previously.
3-12
L.
u.
E.
Initialize the random number seed.
out the swapping cortion of the language
processor for eaCh port • . ~rior to writing the swap
track'out for a part initialize the pOinter to the?
10 word that port's teletype table entry.
Save the Old device table in a bu+fer beginning at
~rite
250006.
F.
"b.
H.
I.
~.
K.
L.
M.
N.
O.
P.
~.
R.
S.
T.
U•
v.
w.
LDR30
If upgrading ~rom ACCESS lA to lB, set the system
. status into' EQT to slept and go to step m.
Get the new ~e~ice table from the lOP.
UPdate the device assignment wor.d for eaCh entry. i·n
the new device table thet nas a corresponqlnq entry
In the 010 device table. Thus maintain old device
assignments in the new table.
Get the oate from the operator.
Clear the switch register.
Get the time from the operator.
CO~y the Operators time and status of not slept Into
the EQT.
Save the olsc ad~ress of the EUl ane the IDEC table
where the system ~r~~~s~~r can find them.
Write the EQT to diSC.
configure the mao .tap~ driver.
If Upgrading from ACCESS lA to Ib halt (HLT 77B).
Start the clock tlCKinQ every 100 mil Ijse~onds.
Print part ~umoer and date COde on the console.
Enable console interrupts.
Enaole power fai I reCOvery.
5 tar t IOF-t ac t i v I t y •
Disable ~JE command if reQu~stec.
Begin 1 imesharing.
This routine Cheeks eaCh disc in the disc portion of EQT
for a non-zero select COde. For each disc found, the
elsc'S label is read and Verified (woros band 9 Of the
label whiCh contain the system level and feature level
codes are not veri+ied).
If any diSC does not contain a
valid label, the operator Is given a Change to have the
diSC labeled Of TSB. Should the operator decide not to
have such a disc labeled for TSb it is removed fro~ the
diSC EUT ana the MHTHL (whiCh is reconfigured to reflect
the removed cisc). Disc 0 m~y never be removed. ShOuld
the operator aeclde to label a disc
question. the bad
blockS table (block J) Is zeroed and the TSB label Is
written to the diSC.
'n
LDRSO
This routine. startinq at loc~tion 32000B. bui IdS an AOT
in 'core for eaCh active (select code #0) disc. For eaCh
active disc in the disc £QT, the disc's lOcked bloc~s
table is reaa into a buffer originating at 773008. The
AUT IS bui It in core reflecting only the lOCked blOCks
for thiS OISC. During the but 10 process, the length'of
3-13
the ADT for this entry (in the oisc AUT descriPtors part
of the lYT) IS UPdate as e~ch entry is added to the AuT.
When the AuT for a p~~ticular diSC is completed, the
st~rting core address
.s bumpeo by 14008 wordS and
another active disc is SOUQht.
This routtne is
terminated When no more active disc ccn be located.
LD~60
ThiS routtne Claims diSC blockS
A.
b.
C.
D.
the
the
the
the
~or:
system
10 tacle
AUT
directory
Sp~ce IS claimeo
in such a manner th6t .t wi I I not cro~s
acyl tnder bOunory untess the space also oegins on a
cyl inder bOunOary. 5pacea claimed ~or the system must be
resloent on olsc O. Also the d.SC addresses of the
segments ot the sYstem are UPdated in the MST. The other
spaces neeaec may be cla,med from other· diSCS if
necessary.
when the space for the oirectory tr~ckS .s
claimed the Initial pseUdO entries are also wr.tten to
disc. Finally the ADT's Which have remained core
reSistent thus far are written to diSC.
LDR7~
ThiS routine reaos system and system I
tape and writes tne overlays to otsc.
tbr~ry
from mag
EaCh recoro after be,ng read from meg tape into a bUffer
at 77300b is processes as fot lows:
A.
~.
C.
U.
E.
f.
NUADT
if end-of-tile-wrlte I~st overlay to disc, rewind the
routine.
If the record Is orig'ned at location 4002b 6ssume it
is the Loader-System LinkaQe table and ·gO to step D.
CheCK both the st~rtino and endiny loca~ion of the
recoro.
If eitMer location corresponds to an area of
memory that Should not contain system COde, abort the
loao.
CheCK the starttn~ location of the record.
If tt
beginS at 7~OOU~ tt must be a system overlay so ca. I
SYSLb to ~rite the preCeding OVerldyto disc~
Perform a c~ecksum CheCK on the record.
Abort the
load if the checksums conflict. Lacy the record from
the butter to the appropriate core location.
Process the next record.
Thts routine is cal led by CLAIM indirectly thrOuQn CLMFL
to read a spectfied AOT ,nto ADT Dufter and to set OCADT
to COlnt to the beginning of the oufter ~nd clear t~e
~tag LTM~l for
SubSe~Uent FSDAu Cdt t.
3-14
RDISL
This subroutine is c~lled eaCh time the diSC' EQT Is or
might be changed.
It sets th~ ~nterrupt locat.ons ~or
al I existing eiscs. using the select code and bit 15 o~
eaCh w~rd In the disc EQT. this routine decides what type
each disc is and recon~igures the MHTBL ~or discs 1 thru
7.
All woreS except word ~ of a disc entry in the ~HTBL
mey b~ Changed. Also the value of MAXSC (truncated ninth
entry) which contains a double Integer spec'~Y'ng the
ftrst absolute sector number which doeS not maP onto the
system disc confiquration.
RDL8L
RDLBL calc~lates the disc address of a scecified disc
label, readS the 32-word ~abel into the disc label buf~er
and checks the CheCksum for val id label.
RQINT
This routine prints a SPecified prompt and Interprets the
use,. 's • n put. Ani n val i din put P r I n t s II I LL E GAL I NPU TII
and aSKS the Question again. A'Simple CR or "NO"
returns to p+~. otherwise, return to P+l with the
i n t eger (1 t hr u 10) t n (A).
RTAOT
This routine returns any number of blOCkS of disc sPace
to the ACT on disc.
It cnecks to see which ADT the
returning 'space belongs to and readS in the correct
one. Then i~decides'whether to insert the new entry
or to mOdify th~ existing entry/entries and uPdates the
AUT to diSC and UPdates the length word o~ ADT in EQT
if necessary.
F(TSwP
This routine returns the swap areas to ADT according to
tne SWA~ A~~A~ TA~LE (SAT) pn disc.
It reads the table
jnto core location l~SOOb and returns 40 blOCkS for
every non-zero diSC address in the table using RTAOT.
Then it zero's qut the disc address and writes the table
baCk to diSC inorder to have the table kept up with the
current status of ADT.
It is cal led during disc reload
and system u~ddte before. claiming diSC space for new
swap areas.
SLoe
Th.S routln~ processes the LOAO/DUMP/kESTQRE command.
It
on t,y returns to the ca I I I nQ po' nt when no more LOAD/DUMP/
RESTORE commandS are wanted. otherwise, it ta~es the
.
input I ine from the console and prOcesses it.
If only an
ID is entereo. it is claced into a table of IO's.
If
fl Ie names are entered as wei I, the entry Is clacedlnto
the directory with the "recovery" set.
SUPDP
ThiS routine is used to balance at I the directory tracKs.
with or ~ithout inserting a new oirectory entry as
specified by the flaQ SUPTG.
SYSLA
This routine is cal led by both system generation and
3-15
svstem UPdate to write an overlav to#~tsc. Mag tape
reload cat Is SYSLH after loadlnQ each overlay. However
bOt~ svstem generation end system upoate cal I SYSLB
prior to IOdding e~c", overlay, ~ence the ~'rst call in
t~ls cas~
IS always iqnored.
If bit 15 of the switc~
register is set, the load ~alts (HLT 15!:U to allow, for
on-I ine patc~inq prior to writing the overley to disc (to
continue Simply press 'run~).
~rior
to wrltlnq thP. first over lev to diSC, the system
and level COdes are cheCKed.
InconSistent ~eature level
Codes (excluoing system UPdate) at low the user to take
res pon s i 0 iii t y •
Adoltional lv, system segments one ana two are written to
oisc to al lo~ room fro~ ADT buffers for space claiming
purposes.
The lenQth of the overlav in blOCKS is calculated from the first overlay (I .orary sizes table) and
space for the overlavs end the user SWdP trecks is
claimed.
TPLI-<
This routine reaos a mag tape label into the first tape
label buffer TL~T and makes sure that it has a TSB label
and a reel number of one. Aefore reaoing, it initializes
the system level and feature COdes in the buffer to zeros
because the T~A tapes prior to Option 200 did not have
such cooes ana the tace levels were 7-wordS lonq Instead
Of
9.
wOLTE
T~ls routine sets UP t~e disc
label. ~rltes the label,
pre-boot processor ano the ~ntermeoiete and final diSC
bootstrao onto edCh of the active.
WTLAL
ThiS routine comoutes the cheCKsum Ot tne diSC label and
writes the entrie laoel sector onto the speCified oisc.
3-16
Re-Pto NE-1.'Rec040 t:Nom
M""!,
~,.~ PG"
"l!N~~£Irt"lI/r
Nt.A .... ~.~ 0':-
>---@
F'I.Pt~,,,,G.
0
~',J"'~'~S
F'L. IT (., t.r ,.,jT" fQ Y
AS ~l",,::;T" 8~
~t:(!oI.JI£RSO
e-
1..1 pC IT
01 ~c.'T'O~y
'r~JIt(!'"
"-0
Bi')(! t;:
O'~C
Rei 1.4 rQ AJ 1'1-1
Ew T"til'l' S
sP",c.
",or
FLOWCHART 1
TO
I
S
IFfy
NOT
c:.Pc..~A
r
~"'I~
)JO
~oo
T A
:t.£)
,- 0
a L.e
G;. . .--------.
tJo
seT I..ltsr
,...,
CHI'! N')£.
C
"i.
D'R£c. r ot:!'1
&"I~'Q.
WR
Ire
'PRo 6,:)') r'f'I
c.~
F
I';'J.:
TOO ,Sc.
FLOWCHART 2
~Ew INC "Nt)
lANL.() AI)
rnA"..,
T' litPE
We'T£ I.4fCl~"'SC.
"\Re:eT',o~"",
I~"~~
TU
C't.C
R£~o,,~
SPAC£
"o~
"\'" H • ~ t: t.,J"I"'1' "
FRo ",
,iO"
p~OCS$~
~C~/~~I~&.
~F
IIIEliT
TA P E'
'P"~r
"T"pr EfNioll. •
"j)
.( .: J)
ON
FLOWCHART 3
>
,I
(ON,SOc.E'
tiz)-_·
"
II"r'IT~
\. ~(:
m"" J ,: Y
PAtlllm.,. 0
DI~
._.....,
!
-r Eoi' .!:I
:
t:FLCt'r
i
Ie (:
CerDIIl.~1
F ...,~L..
'I
.
.......... -
...
....
'"'LA4C':::O".',
1,"0/·
~~
FLOWCHART 4
LAPortTE
:CD
~
~e
P"L
lJl,s C
fH.. '-
1""0
i,
(t',-
So yl/U €
L4~t:.D
f..~ P 0 AT ~
f\ .. L.
c:. .,.~ ~ -"
C'NTR,C ~ T (.)
Re I"L.e79~~).
S~~C£
- the amount of disc sp~ced used
for an tdcode entry exceedS the
r:JfTlount alloweo.
£NT~Y
~OUNT
the number Of IU1 track entries in
the lOT table ooes not eOual the
number Indlcateo by the Eouipment
Table"entry.
CHlL~-
T~AC~
toun~
trac~
~ directory traCK ien9th is positive
or not evenly ~~vtslole by ld.
~.
B~D
L~NGTH
b.
TOO MANY
tNl~lES
of\! TRACK -
c.
~AD
D1SC
~UU~ESS
-
D.
INCONSl~llNT
ENT~Y
- the first 4-word iocooe-name
seouence on a oirectory track is not
equal to the traCK'S corresoondinq
se~uence in the ()I~EC Table.
~.
eNTRY ouT Of
O~OlR
- an tdcooe-name sequence is out of
alphahetical oreer.
f.
bAD
PROGRA~
the nlJmber of entr t es
exceedS bhd.
the diSC adaress for a directory
t r ~ c k Iso u t 0 f t) 0 U n d s •
STARTING ADO~ESS - a proqram entry has a
starttno aOdress ~hich does not fal I
witni~ the range +rom ~OOOM to
c::!uUUUH.
3-18
(,.
SAD PHOGH~~'"
H.
bAD FILt:.
a proqram entry has c! length which
does not fa. I with In tne range from
-~'toOOOB to o.
LE.NGTh
a f i Ie entry has a length ",hlch does
not fa t I within the range from
LE."~G TH
3c!.lb7.
1.
~.
Iv.
015C
-
bAD PSEulio ·l:.NTRY
BAD
TH~CK
S~ACE
the directory entry t s not the
entry.
pseUdO
COUNT - the number o~oi~ectory tr~c~ entries
in the DIH~C Table dose not eQual
the number o~ discs on the system
times the number of directory
tr aCk s Per dis C •
US~O
CH£CKtot~1 disc space used summed
from the Directory Entries.
INCQNSISTE:.Nl
th~
If ~ disc error occurs during the warm Start program
testing, the messaqe "DISC ER~OR - COwR£CT AND RETRY"
Is printed and the computer wi II halt with 518
displayed.
war~
I.
Start functions as
lows:
. AUT-CHECK
A.
II.
A.
~ol
th& select cooe for each of eight pOSSible discS
in the core resident ADT Disc Address Table.
If the
select cooe is zero, zero the remaining two wordS of
this entry. Otherwise, cheCK the val 'dlty Of the disc
address ana ensure that the length of the table is both
a multiple Of 3 and between 0 ane -B19~ words long.
Chec~
IUT CHECK
L.ero
ID~f.(O
~.
Get next IUl:.C table entry.
c.
If oisc aeeress is zero, qo to step
U.
Increment traCk counter.
~.
Length o. tratk
mus~
be neoatlve.
-3-19
Q.
~.
Length 0+ track nust ce a multiple of
G.
Trac~
h.
~eed
1.
~Irst
..J.
10 must ce greeter
~.
Seve 10 In 1DWk0
L.
~umerlc
M.
Aloha part Of ID !"lust be in the range of A to
~.
~da numoer Of bloCKS used hy
thiS 10 to a dOUble word
ouenlty.
o.
UPdete
~.
If there are more entries on thiS
U.
The track counter must eQual tne number of 10 trackS
mcY
no more than
cont~ln
twelve~
entries.
~oH2
in lu trecK from disc.
10 on trdCK must eQual the eorrespondinQ 10 in
the IDl:.C table •
than- IDwRU.
part of ID must bP in the range of U to
pOlnt~r
~9Y.
z.
to next entry.
trdC~
go to step ..J.
(NO H·l1 ) •
III •
uIRl:.CTOkY
CHt.t~
A.
Set pOinter to first entry 0+ DI RcC table.
H.
Lero
c.
Length 0+ treek must be
u.
Lengtn must oe a multiple of tNe'vp.
~.
Number at
~.
kead.n Olrectory frOM disc.
G.
Fir S t
0+
lUlle end
f
0 ur
I~st
~ntrles
w or d s
entry
~ncount~red.
neq~tlve.
on traCk can not exceed
0f
t r de k muS
t
e Q 1..1 a
I
~
cd~.
Irs t four
W
0r ds.
DU=Ct:.<.;.
H.
1+ .nit.al ~seUaO entry ha~ not been encountered
ChPCK for It ~no oc to stpp K.
1.
ThiS entry must be oreater than tast ent'''Y.encountered.
3-20
~.
~aKe
K.
I~
L.
last entry encountered equal
to tn's entry.
thiS entry is a . i Ie gato step p.
Program started aodress must be
bet~een
~OOOB
and
26000b.
IV.
~.
Program length must be between
words.
~.
Convert
o.
Go to step
~.
~ake
Q.
Add length
k.
Advance POinter.
s.
I~
there are any
step I.
T.
Set patnter to next
u.
Increment
v.
1+ pOinter to next OIREC entrY IS not Qeyond the end
of the table go to step C.
W.
Last entry must be the +inal pseuoo entry.
X.
TraCK counter must equal the number of discs times the
number of OISCS times the number ot directory tracks
per aisc.
~rogrdm
words and -38
to positive bloCKS.
~.
sure length
of
ft Ie is positive.
in hlocks to double wore qUdnity.
trdc~
uISC SPACE U5eU
A.
'en~th
-~4000B
~ntrl~S
Dl~eC
left on thiS traCK qO to
entry.
counter.
CH~CK
Tne two oauble Nord Quantities calculated in the lOT
cheCK (ste~ N) and the DIRECTOkY chec~ (step Q) must
be equal.
System ueneratlon
1.
Laro IDEe ana UIHEC tables.
2.
Set
system
i.aentl~icc3tion
to blanks.
3-21
3.
Set number of Olrectory tracks per diSC.
set NOIRT eQuel
to one for 7,"="uO I OC!!taers.
In ~l I other cases, set NOI~T
eQual to SIX.
4.
Set numoer of
'.
uet system
6.
ASk operator
IU
trdC~S
(NDIJ.Word
~--------~-----~
Final Otsc
St~rt->2
bootstrao
with 0 :3
----------------
LOCKed bloCK
Table
________________ t
<-for this
only file
dtsc
lOT Tracks
Claimed
0
1
---------------
"TS"
Logical dtsc #
System
4
5
10"
67
~
System level COde
level COde:
~'Feature
32 blOCKS eacn
as space .---------------"ADT Tracks
ava i I ab I e
32 blOCKS eacn
on d t sc
in tn is
OlREC10toCY
oroer
Tracks
32 blOCkS eacn
.-------~---~------~
uLsn
10
0
•
•
•
JO
Software->Jl
generated 3~
o
Partty Check word
33
------~------~-System
•
LII::H(~kY
•
•
•
•
•
------~--------Swap
TraCkS
42 blOCkS each
Pre-boot
lc!1
:--------~-------
-----~-------------
user
Storage
----------------
3-29
tiP 288:) Disc
logic~'
HP
Disc
c,!
~uC)bec.
t t nder
~umbec.
o
o
o
10
~300
9:3:38U
C:!O
140070
4600
b"iOO
·4
l~b760
30
40
~
~33450
~O
6
2i1014U
320830
60
70
YO
HP 28d'~ [) I SC
Cv'inder
_~uC)bet_
First k'e'ative.
_ ___
t;jlgc:~
____ _
9c!OO
11500
1JSOO
16100
18400
20100
23000
25.300
le::O
~7IbOO
130
i9900
140
32~OO
1~0
34500
3edOO
16U
170
IdO
3':ilOO
4140U
0
1~0
~J'700
c:.:sU
~uO
4bOOO
4~U
b"JO
Y20
1150
6
IJbO
7
8
1010
IM40
2070
'J
First ~elatjve
61QC:ts
46690
100
110
~
sc
1
2
J
bO
4
D.
o
1
0
1
2
3
2tH~.;i
3-30
HP
2tH~3
Di
sc
HP
2Bc3 L> i sc
First
BgJ.g.t.l~e_elQC~
Se(;"gC_~UmbeC
0
i!
3
0
11 1/2
23
34 1/2
4
40
~
f::J"l 1/2
0
of..J
7
8
Y
bV
b~gg_ea.lmbeC
0
1
10
11
12
13
14
I!:)
10
lY~
1/2
4
5
.L~
b
6 1/2
7
J./~
13
1415
1/2
10
1,1
1b4
207
4
10
11
101
Ifj
19
3
3 1/2
9
13d
149 1/2
17
1
1 1/2
2
2 lIe
~
103 1/2
115
1~o 1/2'
17~
1/2
2
3
'-'
9~
0
1
'5
6
7
l/~
6J.gcts
l~'
8
9
1/2
~1
~2
11
~o
3-31
1 1/2
8
9 1/2
10
10 1/2
19
2:&'8 1/2
5 1/2
HP
Loqic~1
7~OO
HP 7900 Disc
Uisc
Uisc
~'!
t::IumbftC
tinder
~umbeC
o
o
o
o
1
2
9744
~~O
194B8
10
20
J
c::"j~3~
:;JO
1440
4
3t;~7t:l
40
1~20
S
4H7~O
~O
c400
b
~8404
00
2~dO
7
b~20t:i
70
33bO
HP 7900 U.sc
nder
_t:tUmbeC-
f erst
____
Hel~t.ve
~lQC;ts
____ _
'100
~u
3~40
90
.. 320
4dOO
lOU
Cy Ii
First Relative
Bl,u:ts
110
S~dO
1~0
57bO
130
o~40
140
6720
1~O
7eOO
.LbO
7680
17U
t;160
1~0
8640
o·
u
l~O
~120
1
2
3
4fj
200
~oOO
~o
144
7
19c:
240
c:: tH'i
336
8
9
4:;~
4
S
b
3b4
3-32
HP 7900 Di sc
HP
1900
IJ
t sc
Farst
tle~d_~umQec.
0
1
2
3
~~!Q~i~~_6!QC~
sectQc._t:lU/]lb~C.
,
6!Qcts
0
0
0
12
24
30
J.
2
1
1
2
l/~
4
1/~
'3
5
~
(;
3
7
3
t5
9
4
10
4
lIe
lIe
1-1
5
5 1/2
l~
6
1'3
14
1!::)
6
16
8
l/~
7
7 1/2
11
8 1/2
Its
9
9
19
20
21
~~
23
3-33
i/2
1/2
10
10 1/1
11
11 1/2
HP l\juS DISC
LOQicat
First
U.Lsc:_~umbeC
6J.g,ts
Cv
I l~ger
~umbeC
aeJ.etJ.~e_t:llQC:ts
0
1
0
0
~~~9.2(lO)
2
49J. ~4 (10)
1
2
0
72
144
3
4
~b77b
3
21b
11b308(10)
147960
4
~H8
~
177~bc
6
7
i:!07J.44
7
JbO
432
504
tj
~3b73b(10)
tS
f..J
b4=.:J
5
6
57b
J.O
7t!0
cO
JU
40
.14+40
2.100
~O
bO
70
Cv
First
ccU~O
3bOO
4+320
~O40
~o
~7.bO
90
100
0480
7cOO
110
7~20
l~u
db40
1.;0
':i~bO
.100t:JO
.10dOO
144
J.4U
l!:)O
100
.110
lbO
1\j0
~lb
cOO
14400
JOO
400
~lbOO
0
7
2bb
JbU
4+3c
504
t:S
~70
'i
043
I i nder
_tlumcec_
0
1
2
3
4
!::)
.. irst
b~l~tJ.~C_b!QC:ts
0
71::.
3-34
11~20
.1~C40
J.C:!~bU
l~bl:SO
~8dOO
HP 1905 Uisc Relative
~Iock
Numbers
tr s t
~ec:tor
~~!CI.1.~e ... ~!QC:~
~umgeC
t-
o
o
1
24
"2
48
0
1
C!
0
0
1/~
:3
1
1 1/2
4
2
5
~
6
~
1
e
1/2
.3 1/2
4-
1/2
9
4-
10
11
5
~
1/2
12
13
14
fJ
fJ
1/2
1~
16
11
let
19
20
JO
40
3-35
Fir st
et1.Letj,~e_a!QC:~
1
1 1/2
t:;
ts 1/2
9
~
10
1~
cO
1/2
15
b
o
"'
I----------------~--:---~--~---------------: HluM OISC
: CYLINOEk NUMBEP
I NOT USE:.U
AUD~ES~
wORD
I---~-----------~----I----~----------------~:
15
13 Ii
o
H 1
:-------~1-----------:--------:-------------:
:
L'Ow DISC
:NOT
AOO~ESS
USlD:~EAD
NUM~Lk:NOT
USEOISlCTOR NUMbER:
wO~D
:--------I-----~-----J~-------I---~---------:
hlo\t-(OWARE
DISC ~UDRE:.SSING
FORMAT fOR H~ ~~dJ
(32 bit uat~ Channel Word)
(ORIVE S~LiCT COUe is
CONTAINEO l~ COMMANO WORD)
3-36
A 1
15
I----~---------------:--~-------------------I:
I NOT USED
: CYLINDER NUMBER
:
1--------------------1----------------------:
15
10 9
8 7
5
4
o
••:--------:-----------:--------:-------~-----:
INOT
US~utHEAD
NUMbER:NOT USEOISECTQR
WORD 1
NU~e£R:
~ORO
2
:~-------:-----------:--------:-------------:
HAHUwAR~
DISC AOQR£SSlNG
FORMAT FOR HP 7~OO
(32 ~It Data Cnannel word)
(OkIV[ SELECT cou£ IS
CONTAIN~D IN COMMAND WORD)
3-37
Q
:----~------------~--:--------------~-~--.--:
I
•
:
.
N01
: CYLINOER NUMBER
USi:.U
WO~D
1
wO~D
2
:-----------------~--:---------------~------:
Jl5
13 le
8
o
7
:~------I-----------:---~------~-----------I
I
:
0
:MEAD
NUM~tk:
S~CTOk
NUM8ER
•
:------~-l-----~-----:~-------------------~-:
H~~UwARE.
Dl~~
fO~MAT
(32 bit
~tJD~£:.:SSINu
fOk
U~ta
H~
7~ij~
Channel word)
(OkIVE S~L~CT COO~ IS
CONTAINED IN COMMAND
3-38
WO~O)
or~c
E~WO~
ROUTINE~
recovery Is predtc~ted on thr~e different types of
inaoility to r~aci or writE' a portion Of the disc
orl 2) totet system fa, lure due to ~ completp d~SC failure •.
erocpssor ~elfunctlon (esPPcl~lly memory eerity errors). soft~are
f~1 lures. etc; or 3)
lOP fet lure.
Recoverv from disc fBI lures
ent~i Is cel I ing of a routine d~pendent on the tyee of entity
involved (user SW~~ tr~c~. directory track. IUT tracK. ADT tracK.
com~~nd overlay. etc.).
~ecoverv ~rom a tot~1
system fa. lure
entai Is use of the war~start eroor~m (oet~i led in t~e sect.on of
t"'is t"lOClJment concernino t"'f.' loaoers) in conjunction ~ith some
oroohytdctlc Me~sures ~t~~yS t~ken hv the sy~tem. ~ecovery from
~n J"P +al turp ent~i Is t~e use of
the lOP ~~~IC routine.
Svstp~@rror
f~llure:
An
1)
oisc ~rror whtl@ S~PlpPlno n user In or out ot
Cd"
to the P0 Q T ZAPPfP routine (PTlA~).
Ar
error In re~ding an overlay C~U5es ~ cal I to ~~erqencv Sleep
(STCKP).
In~bll i tv to r~(II<1 a sys~e,." track
(oarectory. lOT. AOT.
etc.) typicet Iv causes ~ c~1 I to SJC~p.
Occ~sional ty,
ho~ever.
the mpSS(IIIQe DISC Ekf.«(Jt-t .. CAN'T 00 IT is outPut *nen tne error in
re~~ino the syste~ traCK
IS re'~ten to ~ minor command.
An error
in writinq ~ system tr~cK causes ~ c~1 I to tne SALV~G£ routine
(SLVAr,).
Any non-recOverdole read/write fai luras (e.c_~ oort
7epo~r end s~lv~qe are disc reSident: a ~~I lure in redninq tne~
int.o mel"'lorv is d non recoverc=,blp. redd fai 'Lire)· causes ~ ca"1 to
t t"I p S Y S t e r:"I de a t h roo uti n e ([) F.. A 0'" ) •
T '" pro lJ tin esc 0 r t Zoo per ..
!I;~IVlllnf'. rmercency step-o. (lind ne..,c:f'ar·("- oiscussed Delow.
unrecoverebl~
m~norv
In
cau~es
~
t
to ellow recov~ry from ~ tot~1 svstp~ fai lure. the
t~nlp~ on the nlSC m~st ~e uP to ~~tp dna conSistent.
lnlS is
qenprAI Iv thP c~se wit", t~e excp.otlon of thp. r)l~~C ~nd IOFC
me~ory resident
t~b'es ~nd the eauloment
t~nle whicn contelns
news o1tbout thP system AUT ~ntries.
T""eretore. e~cn til"\e a
~trp.ctory
tr~c~
is Snortp.neo or lenothencct. dn 10 tr~c~ is
.s",ort~ned or
len?tnenerl. or a svstp~ trecK is ~oved (see sa'v~oe.
below) the eouipment. the ()TJ.lEC -!nd tht" llJt.c tdr.>les ere ued.dted
on di,C. Tnis preventive I"\pesure ensures 6 ~oo~ cn~ncp. that al I
disc reSident system t~bles ~r~ uD-to~o~te dna co~~istent. The
wermstart proara~. ~nich would bP used In c~se of tot~1 system
fei lure- thUS hdS 0 gond Che'lnce o~ ~in<1ina t",P. diSC In aooC1
O~rl~r
Sh~OP..
3-40
Wn en the
0 LJ tin e •
r
for
~nCh
1·0 P f a I Is. L.t s e r s are Ins t rue ted toe x e cut e the lOP P A 1\1 I C
J his r 0 uti n e sen d S tot h e 5 P a 0 u f· fer e'" 0 t Y not t f i cat ion
port.
This ensurps t~nt the SP ~Op.s not hang because of
full bit set in a user's ?F'LAG word.
In addition, it
nuffer
resoonds to al I requests from the SP with a O.
IF any user
reoulre", .ncut. thiS U f~kes a resoonsE' (all system COde wrlich
receives characters tro~ the lOP treat a 0 as a carriaQe return
-., null (ASCII 0) Is never leQa~ as an input Character' since
nul Is are strioced by the lOP). This 0 also satisfies ~ny other
SP r~quests (e.q •• SysteM sends transfer incut ouffer ~nd lOP
respondS with O. SYstem Interprets th~s ~~ zero length transfer
and is sdtisfied). Final Iv. the lOP is I isteninq for send cold
dumn (~SN) comMandS so ~ COld duma can oe cerformed When the lOP
is in ~ANrC.
l!t
Thp ~p.t result of ~~NIC is to get the system processor to a pOint
whore d SLEEP (or HlbERNAT~) comm~nd can be entered at the system
console. The constant ~~E's and zero responses from the lOP
al low the system to be success~ul Iy sloot.
3-41
routine intorms al I users that the system is gOing dONn,
non~sharea6lp devices (to fre~ the lOP), tel Is the io~
th~t
thP. syste~ is gOino down, Informs the console oper~tor of
imp~"nin9 d~~th. ~nd. fin~1 Iy. helts the syste~.
T~p.
~p~a
cla~rs
~I I
ThP. emerQency sleep routine does the same thin~ dS DEAD wit~ two
memory resident t~bles a~e uPddteo on the.disc and
th~ ~ystem slept flag
is set to sleet. keCovery IS gu~renteed
from ~n eneraency slee~.
exc~otions:
Hot~
Jp.ttison port (~lZAP) and s~lvnQe reSide on t~e disc.
They
arp. reaM into the area ~etween the usar ar~d ~nd the disc driver.
If ~ f~i lur~ occurs ~hen r~adtng, we cal' 0~AD.
Jettison eort KiCKS a uspr off the system. maK'ng his port
unc!v"'1 ',=tole +or further usp.
It first removes the user from the
SCheduler cueue ane cle~rs MAIN in case It w~s set.
The user's
?FL~r, wora is c'earec ~nd non-Shereaole oevices are rele~see.
The user'S aree of the FlJ~S tatde is cle~red to release env f,'es
he ~Icht h~ve been USlnQ. Findlly. we inform the user Of the
loss of ~IS port, set thp. port's stetus to un~vai lable. tel I the
Sy~t~~ n~er~tor of the ~rror.
~nd return to normal
syste~
ocp.r~tion m,nus one POrt.
Is c~1 leo on B f~i Ip~ write of a system table.
It
thet the traCK is in memory startino at LlbUS ana that
wo~n ~ontd.ns the 'enQth ·of the tr~~k.
It also ~ssumes that
STDAP contains thf:' alsc ~adress where thp tr~co( has fai led to
h~v~ been written.
In the worst casp. an entire trac~ (d19~
wOrd~) ano ~ tan'e (SUCh ~s the one createo by the system
op~r~tor'S foJURGE or MLOCK comfTlt=tnC'ls)
is In n1p.",ory.
we are a'lNays
Ou~r~nteeo th~t the SPAce occuoled nOPS not e~teno p~st ~4U006.
FxeclJt i on i s ~s fot I Off'!; :
S~lv~oe
~s~u~p.S
1.
2.
aocroxim8tely l~ (71~M ~orrlS (3 oo~s not diVide evenly
into lK)
chunks Of thP. ADT into ~~vOOH (tnrow away the AOT
If we c~n't redO it) ~nd se~rc~ for a free area 'arqe enouo~
to holo thP. traCK.
If no so~ce .S founo and track to oe
s~tvaQed was ~n ~~T.
throw It ~w~y ~no pXlt. otherwise ~e
~ust dip because W~ can't ",oVP the trac~.
~eao
If space
~pmory
3.
is founa. SUbstitute the new diSC add~ess jn the
resident tablp. that points to t~e resoectlve tr~c~.
write trecK to its new location on the diSC (jf we
~ie - o.oto DEATh).
3-42
c~ntt.
we
4.
the spoce fro~ the AnT for th~ ne~ area Just claimed,
tp.1 I the ooerntor that a tracK was fTtOVed, and return to
normal oroce~sing.
~e~ove
DUMP
C~LD
PROGRA~
Preparation for runninq the cold dump
1•
croor~m
If the I/O crocessor is halteo, note the register vBlues
start It at "PaniC" (Iocetio .... 2000H .).
~nd
~
~
3.
... I t the main' crocessor and record the va,lue of the
-r e Q i s t e r •
Mount
t3
maq tape
J
wit~
C!
write rino and sFdect unit o.
Set the P-regjster to 77UOO~ (the startinq loedtion of
the MemOry resident bootstrap that reaos ~he cold dumc
crOQram from diSC.
The cold dump
seQuentially.
1.
2.
3.
4.
S.
b.
7.
bootstr~c
performs the fol lOWing functions
turn off the interrupt system
A.~. t
and 0 r~Qisters
disable power fai I recovery
read the final rlisc bootstrac in memory starting at
location 40000~.
oet the rtisc address and Size of the Cold Dumc Progr~m
from the Master ~egMent T~ble portion of the final disc
bootstrap.
re~d the Colo Dump Program into meMory startinq ~t
location 40000M.
jumc to the COld Dump ProoraM.
s~ve
The cold dump program is ~ssembled ~t loc~tlo~ ~4000B
hut is read Into memory at location OSCOA (currently
loc~tlon
40000h).
T~e cold dump program cerforms the followina
taskS
seauentlally:
1.
~.
J.
4.
S.
b.
7.
Checks thet unit· 0 Is on line.
Checks thet the m~g tape has a write ~ing~
Rewinds tece.
writes colo oump label.
\oIrites reqister values (A,8.E ana 0).
writes system crocessor memory~
~eads t~e fanal
rliSC bootstrep le~ds ,nto memory at
locetlon 32000A. The ~ST portion IS needed as It
contains the OISC addresses of the disc reSident
cortlon of the system. The in.tidl time the final
OISC bootstrap was read into memory. i t wasoverl~yeo
by thf!' cold dUmc oroara.M after the 01 sc d:tdress and
length of the COld rlump CrOQrdm ~as extr~cted. This
3-44
8.
~.
au.
11.
1?.
13.
14.
l~.
Ih.
minimizes the amount of memory that gets clobbere~ p~ior
to beinq dumped to mao tape.
If possible (If t",e lOP Is "'istenino'l), the lOP memory
is dumped .n ChunKs into ~ 127 Nord syst~m crocessor
buf fer.
Af ter each tr6ns fer i s co~p I ete.d. the buf fer Is
oumped to maq tnee.
~ead system diSC ~rlver i~to memory.
~estore disc driver:
A•
C led r Mb US Y
H.
Suppress disc ~rror meSSdqeS
C. Restore pOinter to the MHTBL
U. Restore oisc driver interrupt ooints
f..
Set i nterruet locat Ions for all oi S.CS.
Dump swao traCks:
A.
read system-loader ',nkaoe table ~rom disc. on
fal lure. forQet ~bout dumping swap trac~s.
~.
From the I inMao~ dre~ n~t the maximum length of
'a user swap tr~ck. starting core address of user
, swap area. length of a TTY table. and the pointer
to the eisc arldress of theSwao trac~ for port O.
C. Dump at I Swap tracks, stoclng after ~~ have been
dumped or ~ disc address of zero Is encountered.
Dump I iorary sizes t~h'e ann FUSS table.
Dump directory trac~s stopptno after ~O trac~s have been
dumped or a CISC. ~cdreSS Of zero is encountered.
Dump 10 Tabl~. stopoinO ~fter 10 tr~cKS haye been dumped
or a diSC ador~ss of zero Is encountered.
Dump Avai lable Disc Tahle, stOPPino after l::J tracKS have
been dumped or ~ diSC address of zero Is encountered.
Terminate Colo Dump:
A.
write 8 end-of-ft Ie marks
d.
Issue a reNind/standhy to mag tace unit o.
C •
Hal t -'7t;j
TI-IC fel lowinq errors are correctable by correcting the
problem and t"en cresslno '~UN'.
Ot~er errors are not
recoverable.
Err or s
'-ilT 22t-1
HlT 338
rilT 44A
HLT 55B
COLD
Th~
a
DU~~
~APE
DISC 0 ~OT READY
NO w~IT~ RING ON MAG TAPE
MAb TA~~ UNIT 0 IS NOT ON-LINE
MAl" T~J-ot:. HAD OP TOO SHOI=iT
FOk~AT
COld dump tape IS written in variacle length recordS with
The tape "IS written
record length of 1~1/10 wordS.
m~Xlmurr
3-45
in t .... e
~o
I low i nq
~ormat.
Co
LD
L~oel
Qeoisters
A
b
DlJ
MP
EXXXXO
System
~"'OCC?4SS0'"
~OOO
(E.xter"d/
Ovf I )
10
loc 2
Mem"r" v
loc 3
I/O
loc 77777
Prqcessor
Me"o,..v
loc
0
EOF'
~wc!to
T,..PIIICKS
loc 1
•
•
•
Swc!o
T,..ltCK
Nt: I"PEP
nATA
0
1st 4
WO,.. d-s
of
TTY
T~bl~
£OF
SWc!o
Tr~cK
1
EOF
•
•
•
Swap
Tr aCt< 31
FO~
EOF
•
~OF
•
•
3-46
COLD
--.--~-----
•
•
...
• )
.•
~--
•
•
"
Library
L i "'". e"" y
Si7.p.s
Sizes tablp
(25t1 WO;'d~)
T~blp
FUSS, t(l!ble
F..
TAPE FORMAT (con t
1.)IJA.lfP
(lOC:'4 WOrdS)
FUSS
Table
:t::OF
-....---_ ... - ....---
fo.OF
------------flO
f)irp.ctory:
Tr.,a,cl= l~ wordS
<=
IS
~OOO(~)
From IO~derMLTdL to MLT~E -defines segments vet to be
oumped
------~---------~---I
~E("t.-1~NT 1INTf:.t-(~UPT
core
loc~t'ons
2
to
core
loc~tions
+rom end
~1(8)
TAHLi:.
--------------------:
SEGME:.NT 2HASl_;. tJAGE
--~-------~-------~SI:::GME:.f'II' 3SYSTi:.M LINKAGt:.
TAdlt:.
----~--------~-----SEGMf:.Nl 4SYSTt::~ St:.bMt::NT
1
~qujpment
Tae.e
o~
io 1777(8)
core loc~tions containing loader
system I Inkage intO-~OU~(8) to
21J1~(ts)
core locations from end Of
Table to ~1771(H)
~-~----------------(Contlnuea on ~age 2)
3-50
DI~~C
2000COM~U1E~
SLEEP MNU
SYS1~~
HIB~kNAT~
lAPE FOkMATS
(Paqe' 2)
--~---~------------SEG,.,iI:,NT 5SYSTt:.M
SEGMENT G
Core locatlons 42000(8)
to
~1177(8J
----~-----------~--SE<';foAENT 0SYSTt:.~
~2000(d)
to 61177(8)
core locations b2000(d)
to 11117(8)
Core
to 77671(b)
core, locations
St.GMt:,NT :3
---~-----~------~--SEGt.-lt:NT 7-
SYSll:.M
SEC.. ME:Nl
4
---~-~--~~----~-~---
SEGMI:.NT 8SVSTt.M
SEGME.t-.T
locations 12000(d)
~
--~--~----------~--Lll:'lto(A~Y
LEN(,TH
TAHLE:
-~------~~------~~--
•
•
•
( a I I 0 f I i br ar y
one per recora)
•
•
•
--------~-----------
Tape must be long enougn to
record at least to ~ere, plus
an end o~ tape marker
EOF
---------------~--~I~
tape Is long enougn, user
program ~nd ~lles wltl be
recorded here In same ~orm~t as
on DUMP TAPE - HI~£~NAT£ recordS
at I fi les and programs.
SLEEP
recordS al I programs and ~i las
that ~re new since last
t-III:1t:.kNATE
3-51
2000/CQMPUTER SYSTtM
DUMP. TAJ.'E.
E.XAMPLE 1
FO~MAT
wor·dS
Aiioc:eted
1
9
Tape 1
wora count=-lO
------
~
-
Negative
Decooes
word
.1
~
I:.OF
~
---------------12
256
256
4
S
•••••••••••••••
6
F tie 1 • Logical
blOCk 1
7
•••••••••••••••
b
...............
'
I' e 1, LOQiCel
t:tlock 3
25b
F
256
Fi •e
C?C3J6
--------------F Ie 1, LOQicel
••••••••••••••••
bloCk
1. LogIcal
:"Lts"
:"TS"
:,not useo
reel num09r
year
nour Of year .
tentns Ot secondS
-3600U
~
system level cOde
feature leve' COde
----------------~to DI~ECTO~Y format
oescrlbed e'se_nere
Ident'c~
Dotted lines aenote IOQlcal
tnformatton divisions'
sol'd lines denote record
(E.OR) g4!ltPS
5
----------~---E.QF
Last Pnysical ClOCK of a
b'OC'< FlLE
End-of-flle
·-~-~-----------I
12
256
(oe~in
4
I
b~OCk
---------_.
wtth 1)
Directory E.ntry
F i Ie 1,.LoC;ical
bloCk 2
count'of recoro
~s:
:
L~dI:.L
~ord
utrectory ~ntry:
••••••••••••••• 1
F~le 2, LOC;Icall
tslOCk 1
--....----------
1 bloCkfi Ie
~OF
--------------E:.OF
---------------3-52
~
...............
1 :v-ora count
:
7
£nd-9~-taPe.
ent ire dump
:LAbt.L
:--------------:t:.OF
:-----------------
3-5·3
but not end of
2000/COMPUT~~
SYST~M
DUMf-' TAPE
FO~MAT
~XAMPL~
2
woros
61lgc;eted
1
:word count
1---------------;
I
9
•
: L14t:H:.L
__
1_ _ _ _ _ _ - - - - - - - - -
ll)lrectory t:::ntry
12
1024
l
:
...............
IProgram
<-- Programs are dumped to exact
A
length fro~
--~--------------
lenQth derived
le < M < 1024
DIR£CTO~Y
wores.
:--------~----~~:
-------------~---
:t:.ot-
I
12
256
256
Uirectory
•
~ntry:
• ••••••••••••••
Ie 3~ logiCal
fjloCk 1
}.
fj
)
} <--
• ••••••••••••••
le3,Logtcei
tiloCk i
Fi
~-bloCk
fa
Ie
}
)
---------------~: ~Of
----------------~
12
.
Directory Entryl
• •••••••••••••••
·
L
tJrogram
<-- L<
t;
lO~~
------------~---I~OF
}
-----------------
)
3-54
wordS
1
:woro count
~
)
: ••••••.••••••••• : )
: .
:
)0
:LAb~L
l )
)
----------------- >
lEaF
--------~--------
)0
<-- Ena-of-taPe
2000/COMPUT~~
SYST~k
DUMP TA .... E.
FO~MAT EXAMPLE 3
ANOTHE.R POS~IBLE
FOkM OF' TAPE 3
TAPE:. 3
------------------.•
Word count
~-----------------••
: "'ord count
.
•i• ••••••••••••••••••••
•
•
:
L~bel
:
EOF
I ••••••••••••••••• :
••
I
Label
-------------~----:
-------------------
EOf
-------------~----: EOF
Directory Entry
------------------: l::.OF
•••••••••••••••••
-------~----------: word count
:
Proqrem C
................. :
: LABEL
------------~-----: EOF
:
------------------I EOF
---------~--------: EOF
-------------~--~-: EOF
---~--------...-
<-E.nd 0+ tke
)
set of DUMP
"
tapes tnaic~tor Less common terminatton-----~---------~---)
: word count
Jlast tQPe is used to
•• ••••••••••••••••••• .> <-E:.no-of-tape
contain only the nend
••
of the set of DUMP tapes"
•• ))
: LAt1E.L.
indicator
----------------~-~
: EOF
------------------"
Normc!tl
)))
)
last entries
3-56
2000/caM~uTER
DUMP
SYST~M
TA~t:.
FO~MAT
I:.XAMPL£ 4
N
----------------~-: word count
•• •••••••••••••••••••
TA~£
TA~E.
-~~----------------
: Word count
I ••••••••••••••••• I
•
•
I
N +1
I
•
•
: LAAEL
I LABEL
I
I.
I
I
•
---~--------~-~~~--
~---~~------~~-~---
................ .
Fi
4, LOg j ca I
Block 5
:
~
'e
Directory E.ntry
File 4, LogiCal
•I _ _ _ _ _ _
: t:3lock 1
.:
.. -- -- -.--.---: Ft Ie 4. Logical
• tjlOCK 2
--_ -
Logical
loCk 0
I--~--------~-----.
: File 4. Logical
: BloCk 7
--
-~----------~-~-Fi
'e
4, Log i ca I
•
: LABEL
)
)
)
)
---~---~---~-~----I EOF
)-
•• •••••••••••••••••••
••
-------~-----------
E;
----~~~------------
•
~~---~-----~--~~~ }
)0
: Ear
word count
I
: EOF
--------~-------F', Ie 4, LOQical
~Iock 4
~
Fi Ie 4,
-~-~----~-~-~-~----
Block 3
---~--~~-~--------~
---~-------
:
•
•
•
)
)0
3-57
SCr-4EDULl~G
4-1'
SCtjEOUL.lt:H2
Th~ h~StC Chi IOSOhy ot the TSH sCheoul Inq a'aorithm Is to orovlde
short re5Ponse times ~or short. interactive )005 at the possiole
co~t 0+ ~pl~ys
In longer runninQ jons. The imbla~entatlon o~
this tnvolves a Queue Of jObS to run which IS ordered according
to ~ o'ority scheme. The ou~u~ Is a I inKed I ist of from 1 to J4
entries. e~ch entry pOinting to the next entry, and the t~st
entry pOintinQ baCk "to thP. first. The 34 oossiole entries in the
oU~\Je ~re the 12 user LI"'t< entr,es, l' LINt< \Nord In a truncated
TELETYPE tenle reserve~ for th~ syste~ conSOle. Rnd a Queue he~d.
Thp, aup.ue hedri consists of ttie loc~tlons ~"LI"'r< (0:2). c"\nd IS
~Iw~vs
tn the Queue.
T~e Qu~ue heao has a oriority Of
7/717(H),
Nhi~h
is stored in loc~tio~ MLINK+2. ~nd it IS always the last
~ntry
in the Queue.
As ~n eXB~ple of hON this ~orKS. ~ssume th~t
usprs 1. J ~nd 6 ~re on the QUeu~ In tndt order and so IS the
svste~ ~onsole.
in e 00sj tlon ~etw~~n users 3 and b. Then tne
QU~UP' wi I I have the tOI lowlnq ~opeRranco:
TTy II 1 +? LIN K
<-----.---:-----:-------:
~--------
u
---------
TTYlJ3+?LINK
<---
.---:-----.: -------1
. : -..---:-------:
----~------~
TTYOt+":LINK
<~--
----.. _--- <--. --- : ------:-----~-I
't~LFV
4
---------
<---
.---:--------
:-------:
11"111
4-2
:
MLI~K entry
i~ d'w~yS ,t~~
last entry on the aueue.
is a painter to the first ~ntry. which in thls case is
TTvOI.
In the case of en emoty Queue. MLIN~+l ~i I I paint to
Itsptf. i.e •• CONT~NTS(~LINK+l)
CONTENTS(~LINK).
Each ent~y on
the ~ueue has a priority no less in numerical value than that of
the one its points to.
When an entry is to b9 added to the
ou~ue.
It is asslqneo a priority according to the rules described
below. and th,en INSE:.Q i4S cal led.
INSEQ computes a new priority
u~lnq the fot lowin~ formul~:
S.nc~
the
MLl~~+l
=
New oriority
= -(ala
~riority)*(nU~ber
of ports logged on +1)/4
oueue ordering 's o~eserv~d by Insertina the new entry Just
of the first entry Nith a lower (more negative) priority
nU~bQr.
Note that When the ~irst @ntry in the queue hes priority
o. it wi II maintain that position unti I it is removed from the
QUp.up' entirely. To ensure th~t al I jObS wi I t eventually reach
t~p top of
the aueue. the priority of the entry Just behind the
new entry is incremented ny one. Note th~t bv uslnQ the number
of ports loqoea on the system as a factor in oeterminlng
priority. we base the speed at whlch JObS re~ch the top of the
ou~ue on th~ system
load.
T~e
ahe~M
Th~ fol lowinq rules are used to aSSign
(ana reaSSign) priorities
by rout i np.s wh i cn ca I I INSF (~:
I'.
tJoon first enterino t"'e Queue,
follows:
jobS are
assi(~ned
priorities
-31;
~YNTAX
lines dna JOhS rp.turnlnQ from I/O suscend:
0
1
HASIC commandS H, a . ~
. ~ . an . a . or an ,
~ RUN
jOb is reassioned a prior~ty of O.
RtJf'04
The C~FATr command is re~ssioned a criorlty of 4 when It is
susonnoea after wrltana file m~r~s in 40U blOCKS.
Aft~r
~n
abort during oroaram execution a user
4-3
is re-asslgned a
oriority of 0 to run the routine which
date +or f i I es.
uPd~tes
the last c.hanQe
the
coi ('Its to· the I ocai on I n the COMTABLE of the di sc ~ddress of
library routine in core. LIH = 0 when none is present.
Th~
fol lowjnQ conditions must exist for the scneduler to permit
LI~
ex~clJtion:
A)
for Syntax ~no HA~lC commends;
set td potnt to correct user
~AIN
R)
for
MAIN
LIR
diSC
reslcent
t~ble
comm~nds:
= 0
~et
to
corr~ct
~isc
reslden~
routine
Th~ ~chedul~r routine S~APR
is responsible for creatine these
conrlitions. and makes its decisions ~cCOrdlnQ to the values o~
MAIN, LIb, end tne entry on top of the Queue.
4-4
SCHEDULER
UPDATE THE
TIME OF THE
.. HOUR.
8u;.tr
-re~jIo\lj,ler
::c':i) ....
C.OUHT
ODD
('HE.c.)<
~!\.
UU~
fAUSt:
( ...."'~M.'·,)
IIM~ CI
u·i'
·ves
CLFCLOCK
SAVS REGISTERS
ANO BLOCS< THE
CLOCK.
CLFCLOCK
NO
NO
PRIORITY-4
REMOVE FROM
QUEUE.
FLOWCHART
1 of 13
SCHEDULER
INSERT THE USER
ON THE QUEUE
BY PRIORITY.
ADVANCE
POINTER TO
NEXT TTY.
Cc..EAf\ THE
PAC .,.
alT.
FLOWCHART
2 nf 11
SCHEDULER
SETPOINTEA
BACK TO FJ RST
TTY TABLE
No
c..:, ""s.,..~u(.t"
l!"iV..1.
A)..Ii)
Me;-::O!).\GIO
U i' j) ,;'T"~
UPDATE COUNT
ANOMEe5AGc
BUFFER POINTER.
Qve:lJS"
UPDATE COUNT
AND SUlLO
LOG MeSSAGE.
FLOWCHART
'1
!~
1
3
C"~~T~lJc:.T'
MG'~~A"~
#
S(HE:DULE ~
St:N.b TUo\ 10 :tOt:.
~E.;.elv':
01)1\1"
M€SS"'"
"'ES~"".J
'':'10.
HT A ... ~
Pc; I"'T~I\
StiNI)
M Ii OS :. ,\ C; L!
'T~
-roP
FLO~7CHART
4 of 13
SCHEDULER
NO
YES
GET COMMAND
PRINT Un?""
YES
PREPARE TO
PLACE THE CON·
SOLE ON THE
QUEUE.
SET POINTERS
FOR QUEUE
INSERTION.
S E'T
PAc.T
8,T' F9g.
'])IiV,<.E'"
U~
e It
SCHEDULER
INTERRUPT OFF
LIBRARY TYPE
PROGAAM$ MUST
RUN TOENO
UNBLOCK THE
BEFORE BilNG
SWAPPI!D OUT.
CLOCK.
PRIOR'TY .... O
PREG .... 1RSTR
7ASTA",
ONLY 8ASIC
PROGRAM
seT THE TIMER.
EXECUTION IS
TIMED.
_----_._- - -
......
SETTIMEF IF
THIS IS RUN,
LasT
-,.
P";IIICt4
RESTORE
REGISTEnS.
RESTOR! DISC
BUSY FLAGS.
ENABLE INTER·
RUPT AND EXIT
VIAPREG.
FLOWCHART
(:;
nf=
,~
SCHEDULER
AN INPUT H.AS
BEEN TYPED OR
AN OUTPUT HAS
ALMOST
COMPLETED.
CODE TO
HANDLE ABORT.
___ _ -10--------'
REMOVE USER
FROM QUEUE.
RESTORE THE
ACTUAL STATUS
(SAVED IN
?PLEV).
HEMOVE OUTPUT
WAIT .4\"'1) C.HAIN
S,TS' F.(o,"l 1 F..
A,
KILL OUTPUT.
SETPLEV"'O.
SETUP FOR
RUNNING CORE
RESIDENT ABUCO
ROUTINE.
IH"!lA\"L.,uW
ADJUST POINTER
FOR TTY TABLE.
tErMc,vo!
F;'f..oi'\
QuEUS,
S",j\'f\I~ (.oLe)
C.LEAI.
·"et.\.
Use
:toP
~
"~<:l.TI~" ~
kiLL.
IF
IiSa~
ov,,:
ftLG
p~t!''';';N'''''
S<.a.AfC.tt P~(;4it~
IP
cit
... 6L.L.O
A,.. ..THq~
U:'.:~ 's
L.e><'KeD
r'~o,j(MJ\
II
:'STefl"
FLOWCHAP.T
Aa"~r~
."'
Si:T Pl\lo~IT'i ¢
SCHEDULER
CODE FOR
FORCED DtSCONNECT
(USE R HUNG UP).
REMove USER
FROM aucus.
CLEAR ABORT
FL~GS.
AN ENTEA
STATEMENT- HAS
TIMED OUT.
SKiP RJ!START
MEANS ENTER
TtMEOOUT.
" -_ _ _ _ _......1 - - -
RS·rR .... ASTA+1,
FLOWCHART
R n-F
,~
SCHEDULER
A LINE HAS BEEN
ENTERED FOR AN
IDLE USER.
------------._ .... _"------_....
PRINT"???"
?PLEV
~O
PRINT "PLEASE
LOGIN"
SET ?RSTR FOR
SYNTAX.
PRINT LINE
FEE'C.
STATUS-+, SYNTAX SeT B
FOR INSeQ.
TELL COMMUNICATfONS
PROCESSOR THAT
ANOTHER LINE
IS ALLOWABLe:
FLOWCIlART
SCHEDULER
COME HERE
WHEN A VALID
COMMAND HAS
BEEN FOUND.
Cl£'ftR
""Ar~ Mone
FLAG-
CHANGE COM- .
MAND TO -rAPe
eRltOR PMS!NT··
CLEAR TAPE
ERROR FLAG.
e
FLOWCHART
10 of 13
SCHEDULER
SET PROGRAM
STATUS.
II
SET STARTING
ADDRESS IN
LIBUS.
?PLEV
~2
SET B ~?LINK
FOR INseo.
SET STARTING
ADDRess.
?PLEV
~1
SWAPR
---- ----p.-------..
THIS ROUTINE
PREPARES THE
PROGRAM ON
THE TOP OF THE
QUEUE TO RUN.
SCHEDULER
5 I C.KP
SAVE DtSC 8USV
FLAG IN'TTY
TABLE.
WRITE OtJTPR~
GRAM '''' C-...A!.
MAIN"'O
FLOWCHART
12 of 13
SCHEDULER
RETURN
SMAIN +--1
INITIATE
READING
LIBRARY
PROGRAM.
e
e
COMMUNICATION
~ETwFE~
4-5
SYSTEM MODULiS
Therp.
six system mOdulps th~t communic~tp. Nett' each other
ways:
t~e elsc rlrtvrr.
lin Processor driver, syste~
console oriver. scheduler. HASIe. and system I lorary routines
(HELLO. ~YE. KILLIu, etc.).
~rp.
in
v~rious
Any section of
(mov,~o-~e~d)
t~e
elSC
Syste~
m~y
transf~r.
c~1
I the nlSc'nrlvpr' to perform ~
Pdra~~t~rs are oassed to t~~
Thr~c
or ivpr:
A
=,uointer
to elSc
a~~r~ss
(thp corp aodress ot e t~o ~ord
oisc bloc~ numoer et
Which the tr~nsfer is to beqin)
IO~lc~1
f-4
= core
(bits 14-0 - co~e address at
Nhlch trdnsfpr is to oeqln; bit
l~
i for rp.nd from diSC to
core; vits 1~ = 0 for write from
core to ,-jisc)
~orJress
=
= the
of thp. nUMner of words to oe
tt"te dr iver Ni II cause no tr~nsfer. but
will oositicn the dCJurooriatp disc unit fl\t th~ soecified blOCK.
T~p.
v~rleble
tr~nsf.err~d.
The
~ISC
MWO~u
neQ~tive
If MWtJ!;U>=O.
orlv'er
is celled by ..JSt-i UISCA,.I.
Th~ driver determines the 10aic~1 nlsc on whic~ the ~pecified
blOCK I ies. and, It th~t 10oic~1 diSC is pre~ent on the system.
ornco~ses
the requested tr~nsfer.
whi Ie e request is bein~
orOCPssed ~n~ transfer t~~ina ot~ce, the orlver OUSY fl~e. ~~USy,
is s("'t to -1.
If the "rlv,?r IS c~lled whilp MfjUSY IS so set, it
wi I I return without cOlne anythino.
Jf the diSC OIOCK number
O~SS~rlto tt"te nriver OOPs not
I Ie on onp. Of t"e discs oresent on
t .... p, system, the r.rr .ver Will jncrement the return c!lddresS by one
~n~ return ~it"out dOlnq ~nvthjna.
If the nriver accepts the
rPQUp.~t.
it v- ill .ncremE=!'nt t~e return ""oorp-ss :lY two and return
~ft~r orocessine Ot
the r~ouest has b~en initi~ted.
A Movlnq M~~d else transf~r tnvolv~s two steos:
OOSitjoninQ the
to the correct dr~M c~ the dtsc ~no c~rforming the ~etua'
c1;,t .... trtolnsfp.r.
Th,~
driver returns to j'ts cc:'1 ter w,",i Ie e~Ch
o~ these
is <;lOlnq on.
COmrnl=!nd channel interruots return control
to thp. driver ~hp.n the oo~r~tions arp comol~tp: t"e driver checKs
for successful comclet,on of the oopr~tions before oroceedinQ.
he~ns
e.se
4-6
sin' 1 I e ci 13 t c!I t ran S fer 0 n a (1 I sec s,n not aut 0", a tic a I lye 0 n tin u e
from one cylinder to the next.
The 7~Ou diSC has the further
restriction that a transfer cannot cross the IImld-cyl Inder n
bounct~ry
(between trac~ 1 and trac~ 2). when·a data tr~nsfer
rpcuestoo whiCh crosses one or more o~ these boundaries, the disc
-driver br~aks uP the transfer to .conform with the restrictions.
fl,
.S
When the driver completes hand' tng a reauest and returns to the
I I p.r, ~HlJSY is set to I nd i cate the o.u~come of the. transfer as
follows:
C~
0:
1:
2:
3:
The requestea tr~nsfer has been successfully completed.
The transfer has f~i led; the seeK (cosltion) operation
could not bPcomolpted.
T...,e trdnsfer. hdS fni 'ed; the nata transfer was
unsuccessful.
Th~ transFer hnS fai leo; p~rt of the data
lies on. or
woulC'S oe written to. a disc' whiCh IS not cresent on
the system.
COMPlete oisc
SPQupr"'tce:
trans+~,..
A
.JS~
Celn
be
Pf!!rForrned by the fOllowing
DISC~.I
LOA r-1RU:;'Y
SSA
~MP
-;s.-2
SZA
Th~
~n~
rlisc driver does not ~OOlfy thp. contents o~ MWORD and tne A
reolsters. lhe system never suspends ~ orogram for a disc
~
tr~nsf.er.
4-7
SVc)Tf.M CONSOLI::
The
console oriver ~ajn~jns three flaqs. TJ~Fl. lJ5Fd. and
which netermines Its st~tus.
Tne meaning 0+ these flaqs
follows:
syste~
T1~F3.
ar~
f)~IVt:.~
~s
•• 1- driver
=
Norm,::, I I y o.
is buSy. l) othPr""lse
t t is set to -1 bY t .... e
clusion 0+ inout. .enn clecltred to u
NorrT'le I I y o. it is set to -1 by th~
Inout. ~nd cle~reo to u
clusio~ of
output nBS heE?n initiated.
T3SF 1 :
T3~1o="2:
T 3Sf 3:
ThR
co~t)lnpC
Fl
F2
~j
0
0
0
-1
0
-1
0
-1
-1
-1
-1
vRlues ot
tnes~
fl~os
are
~ore
drtver at the conexternally.
dr i ver at tne conby tne drtver after
slanlflcant:
.
[Jr I vpr
~
ccc~ptinc
inC'lut
lnout COmlllbr'lC1 receive,., lItr'lc:l I s belno orocessecte cut
outPut h~S not hefJn Inltic!l'teo.
0 out out termln~ted frorT'l I! SystP,,., commt9nd -"hicn Is to be
reinltiated.
0 outoutting
0 outouttina. .. t thp. ene:: of which the current syste"
comM.;:,nlj Vw I I I be reinlticllttp.rl.
0
= - 1.
the 0 r I v e r w I I, I not .e c c e eta n yin 0 u t •
Tn i s
SysteM 'Ibr~ry proQr~~~ tnat t~P.y wi I I not be
int~rfered witn.
TheSe routines ~re ~p'sponsloIQ for c'a~ring
F? Ai"',,"n tney cc!11 tha "r i ver .for thl) last tiMe.
Fi: .dnrl tne
consol~ st~tus
(T3b~T)
~re cl~ar~d
if e K~y i~ struc< on t~e
co,",!:nle durino outout +or certnin ,console routin~s.
TnlS ~i I
eft-p.ctivPly t~·r"'lncte suc,,", routines -=ts f>I;'· if ~et indicates a tp.rm;nct console
Normally U,.} when d ~otor Shutco~n Is In orogress
Nor~al1y 0, 1 when·a motor shutdown is
In progress
Contains th~ ~otor st~tP. 0 is off, 1 if on
Cont~ln number of f' 115
left to·outout
~it
TO:
Tnsu:
r~ITST:
TFC~T:
T., e
A:
~:
c ~ I lin q S? Que nc e is:
bit 1~ = 0 .if C~Lf is to be aooended. oits (14:0) - # of
Char s.
oit 15 = 1 If ~unchinq is to taKe place in ~ddltion to
orlntin<;l. bits (1,+:0) = core r::tocrpSS of outout buffer •
.. J S ~
The
TTY 35 • 1
uses the ~b word ~uffer T3~RF as ~n inout ouFfer.
of the I iorary rout ines use it For output, and occasionally
For t~~oorery storc~e bet~epn lines of outPut.
~r.vpr
~ost
4-9
SYS1~~
~kOCf~~Ok-I/n
~HOC~SSO~
'CO~MU~lCATJO~
4-10
The bl~Ck d~agram for the Processor Interconnect Is on the
second page ~ol lowing.
In the IDLE state. the 'nter~ace cardS
are set UP as follOwS:
Cl (CHI)
CONT~OL
"L~'"
C~(CH~)
&
ENOCOU~:
CONTROL
~
ENCOD~:
FLAb:
lk 1/0
PROC~SSO~
Numeric
Value o+-
Oe __ Cgc.e
~oim~olc
0
1
2
3
poe
STi:.
4
PC .. ·
5
6
MI~kO
7
MIKkO
Process output character
start ENTER Timing
Subt~Qe information
Phones timing parameter
Perform C9ntrol funct.on
Process output string
Micro COde grouQ 0
Micro COde group 1
~OfmgOlc:
Oe~C:l:let12o
Mlt 0). ~hen tne response is affirmative the SP wi' I
send the message via ~os.
The al locate device COmmand contains a logical unit number In
bits 12 tnru 7. The Second word Of the command indicates the
size o~ the bu~fer which Should be at located for the soecified
device.
The IO~ returns a one word response ;ndicatlng success
(resoonse
0) or deVice busy (response <>.0). TniS command is
sent whenever an ASCII file is opened on a given lOP device.
=
4-21
RDV
The release device command contains a logical unit number In bits
12 thru 7.
This commQn~ tel Is t~e loP that the speci~led device
is no longer needeo and that al I remaining cuffers for the deVice
should be written and then de-al loc~ted. The lOP returns e one
. word response. See section on 1/0 responses for pOssible return
v~lues.
8L..8
The alloc~te b~.fer comm~nd contains a log.cal unit number in
bits Ie thru 7.
The second word of the command contains the
lenqth of the output buffer In bytes. The IO~ then returns a
one word response.
1+ the responSe 's zero. then the SP sendS
the output buffer to the lOP via DMA. See section on 1/0
responses for other pOsslole return values.
The transfer input buffer command contains a logical unit nu~oer
in bits 12 thru 7. lhe lOP returns a one wore response
indiCc!'ting whether It hes a full input buftp.r. on the sDecl~ied
device.
If it aoes (~esconse
0). then the SP ac~nowledQ~s the
response (STC.ClF) and then the next word ontha send channel is
the size of the buffer (in byteS). After acknowledQing the
buffer size the S~ transfers the Inout buffer using DMA.
The SP
aCknowlee~es receipt of the huffer by another ~TC. ClF.
=
tU~S
The h~CKspace terminal cuffer command cont~lns a port number in
bits 1~ thru b. lhe Commen~ causes the IO~ to oackspace the
speciflee terminal's .ncut buffer pOinter one Character.
~OO
The ki I I device output command contains a 10qlCdi unit number in
bits 12 thru 7.
This command tells the lOP to comPletely pur~e
and de-at locate aMy buffers or activity on the specifjed deVice.
USURllv sent due to unrecoverable 1/0 f~i lures or abnormal
proqram terminetron.
The fetch next Character commend cont~ins a port number in bits
12 thru 8.
The lO~ returns a one word res~onse whiCh is the next
character in the speCified Dort's incut buffer. The Input
bu~~er pOinter ,·s 6dvenceo to the oe')(t-cnaracter.
4-22
~JE
The remot~ JOb entry command contains a word count in bits 12
thru 7.
The ~ommano *s sent when the system operator types an
RJE command on the system console.
The word count is the length
of the ~essage.
The lOP always rejects the R~E command the first
time.
The lOP
I I send 'WRU when It Is ready for the meSSage. '
The RJE'command IS then guaranteed to be accepted and the ~essege
IS then transmitteo to the lOP via DMA.
w.
8~I
The user ls aborting commdnd contains a cort nu~ber In bits 12
thru 8.
Th,s commano informs the lOP that the user program on
the spec.fieo port being aborted oue to the user hitting the
B~EAK
~~Y.
215
input str.no Command contains ~ port numoer in bits
Tne secone word Is the buffer lenqth w~iCh the
specifieo port has allocatee for )nput.
The IO~ reSPo~dS with
the.~ctual
numoer Of Characters it haSt WhiCh ~. I I be ~ th~
specif.ea·buffer lenqth.
Tne S~ aCKnowledqes the ouffer length
with ~ STC. ClF and proceeeS to transfer the Input buffer via
OMA.
The transfer is acknowledged with an adoltlona' STC. ClF.
If the lO~ actually hed more characters than would fit in the
port's S~ buffer, It WI t I transfer one buffer ful I and remember·
the buffer position.
~ SUbSequent PIS reauest WI» I receive
Charactprs starting from the pOSItion that t~e previous request
finiShed.
T~e
12
crocess
tnru~.
SCI
The Sp.nd core Image comMand contains a word count in bits 12 thru
7.
The second wore of the co~mand i~ the starting address.
The
lOP res~onaS by senoinq the specified number of worrds. starting
w.th tne specifieo aOaress.
The sP. receives the reSPonse via
UMA.
lnis commano js sent whPn the user AUUO uses the DUM~
com~and to oump the lOP memory.
4-23
RLB
release buf~er command cont~ins a cort number in bits l~ tnru
T~iS command is sent to ~orce t~e lOP to print and release
any output which is in ~ buf~er ~or the specified terminal. This
c~mmand IS sent by the SP whenever
it wishes to enSure th~t al I
user outPut has been printed 'i
whenever a .port is swapoed
out) •
T~p.
A..
.e.
sso
The system shut aOwn comm~no is sent to inform t~e IO~ tnat the
5 yst em i s be i ng Shut down due to the syS tern oper ator aexecut I ng
the SL~EP command.
see
The save buffer pOInter command contains a cort number in bits
12 thru 8. ThiS command tells the lOP to save the current value
of the terminal input buffer Dotnter on the specified port. The
pOinter value can be restored by the RBP command. These commandS
al low the SP to reaa the next ~ew characters in the bu~fer (via
FNC) and to return to the current oosition without sendIng
multiole BKS'S.
Bee
The restore buffer pOinter command contains ~ port number in bits
12 thru~.
This command tel Is the lOP to restore the terminal
input buffer pOinter On the specifl~d port to the value saved via
a SSP.
The tr~nsmtt console mess~ge command tel Is the lOP to send a
console message to t~e SP. The transfer is hanoled vt~ OMAG
Th'S comm~nd is sent by the SP after the S~ has received an SCM
comm~nd from the IO~.
4-24
The PoSSible values are as
SP.
-3
-2
-1
U
1
2
3
4
~ol
lows:
No data available on RJE or LT
eno-of-~ile
not reaoy
successful
oevice not ready
device error
attention needed
redd/wr,te fat lure.
bu+~er
op~ration
In the case of a -1 resoonse. the lOP wi I I send a WUU for the
aooropriate dev,ce when a bu~fer beCOMes aveilable.
I~ the
responSe ;s greater than O. the S~ wi II eventually send either an
ST~ .(,n wh'Ch case the lOP wi« I
sena a wUU When the condition has
been fixeo) or a KUO.
4-25
I/O
P~OC~~SO~
COMMU~lCATIONS
TO SYSTEM
P~OC~SSOH
The system processor receives communications ~rom the lID
processor on lID Channel Iv.
The system processor ignores
inconsistent communications, e.g. ~ccects a I ine of input only
when the user's status IS IDLE or INPUT wAIT.
The receive driver
communicates with the sCheouler by setting th~ ~ACr bit in the
?FLAG word o~ the port's teletype tahle and settinq the
acorocrlate status.
COMmunication re~uests initiated by the 1/0 ~ocessor are divideo
Into three general Qroucs. user port commandS affect one
perticulbr port dna incluoe HVL. HLP, HLL. AO~. ~FL. ~FE. ~TO and
UHU. Another group o+~ects operation o~ the R~~ faci I Ity and
inclu~es
~CM,
AU~.
kUk. and ~AU. The remaln,nq commana. WUU,
concerns oceration 0+ ~ non-shareab'p. deVice.
4-26
~UME.RIC
VALUE OF
QI: __ COUE.
~~I:.~(J~lC
Of..SCBleilCt:.I
0
HVL
Have a
1
2
3
HLf-i
t1~ve
6
HLL
(UnUsed)
(unuSed)
(UnuSed)
(unuSed)
7
MIKRO
4
5
line
a line - par j tv error
Have a lane
'ost cheracter
Micro Codeo
4-27
MIr recovery routine is someWhat .more complex.
It first sets
F'owFF to 1 and re-endbl~s power-fat I interrulDts. Tne'SP then
reconstructs the POSSible nesting of power-+ai I, receive Channel.
's'ystem consO.le, ana t Ime-bese generator drivers.
It does thi s by
comperinQ the return ~ddress of eaCh active routine (power-fai I
is de f~ctQ active to injtiate this searCh) with the ooundarles
of the tower-priority routines it mlQht heve interrupted. EaCh
fl~g whiCh was clear at· t'ne power failure
is cleared during tnis
crocess (the receive 'Channel f lag is ~tways cleared here) ana an
interrupt is forceo tor eaCh active routine whose flag was set,'
4-36
to cledr the flag bu+fe~ and p~event a false ~nterrupt f~ter. At
'e~st .eighty 'nstructlons WI ,.
be executed by completion of thts
~ctlvlty.
The" SP assumes that the lOP has reaChed the w~"i"tloop
of Its recovery routine and transmits the ~nformatlon WOrd
described above.on Its send channel. The two processors ~re now
in SynChron'z~tion.
At thiS point both processors have a complete record of the
Interconnect.s state dt power-fa' I. The SP ~eits for the lOP to
set the SP's send channel flag and 'is then ready to perform final
resto~atlon of the interconnect.
If'both processors were tn
thei~ O~A rout~nes or one was and the other had not yet reached
its. then the abortea transfer must be restarted. The SP either
cle~rs
Its s.nd Channel flag 'f the transfer wes .romlt to the
lOP or leaves it set if the transfer was from the IOP~
If the SP
was in Its OMA routine, and the transfer must oe restarted. it
restores the OMA parameters; if the transfer was comPleted It
le~ves the routine's length parameter at zero.
If neither
processor was In its uMA routine but the SP's send channel flag
was clear • • t restores the word from SCHNO and issueS the
'STC n.C' to transmit it. Flnal'y, the SP automatical Iv ~'aces
the current value of kCHNO on its receive Channel, sendS' .t to
the IO~ (~htch Is walttnq to re~tore Its' send channel), and
increments ~owFF to ~ to sinqnal restoration of the interconnect.
Tne SP now completes preoarations ~or restdrting an acorted
inerconnectterconnect DMA trans~er.
It cheCKS the return adoress
of each interrupt routine. except those WhiCh were identi+led as
interrupting other interrupt routines in the logiC above. to see
if it I ies within the critical P9rtlon of t~e transfer routIne.
For those that ad, the return aaoress is replaced w~th the
tF~nsfer restart
instructi'on's addr~ss. This ~~ I I have no effect
except tor the one ( I f any) actlve routine which actual ty did
inter~upt from the transfer routine.
If the trans~er had
completed, the length word was teft at zero end the restart wi I I
not invOke DMA.
If a tr~nsfer was aborted. then the parameters
were restored aoove and the transfer wil I be repeated correctly.
The r~mainoer of the ~p routine consists of performing the
out-of-I Ine oevice recovery routines. resetting POWFF to 0,
resto~ing t~e haroware r~Qisters and interrupt system flag, and
resu~,nq time-sharing.
4-37
se
loe
00
00
Neither processor
00
01
loP aOlng
routine ....
01
00
SP doing transfer,
routlne.*
oi
OJ.
~oth
01
lu
SI-J In Its trans+-er routine but transfer
complete.
10
01
lO~
In its trans+-er routIne but transfer
comPlete.
10
10
~either
10
11
5~
in its trans.fer routine.
SP not yet to Its transfer
tr~nsfer.
rop
not yet to its transfer
ana IOP in their transfer routines ....
processor
in its tr6ns+er
is
is
ro~tine.
lOP aOlng transfer. SP not yet to its
tr~nsfer
rou~lnE!.'"
11
10
SP do.nq transfer. Inp not yet to Its transfer
routine.","
11
11
Both
11
00
SP in its trdnsfer routine eut transfer
Sf.-
ane
lOP'
the~>
in
transfer rout ines.*
is
com~lete.
00
11
lOP In Its transfer routine out
com",'ete.
tra~sfer
is
wi I I oe restart~d.
The SP must set Its send Channel
flROI IO~'s receive Channel flag accordinQ to the transfer
direction.
~Transfer
Imposible
Combinations
D~AfL
Sf-':
uu
10 .... :
lU
01
i-J.
4-38
10
UO
11
01
i0fi'1
a!d02
..
..
-"'~9H"3
..
.,1004
..
'05
*
d0~6
..
~0"'J
."
8008
8009
.*
0010
9011
TH~ FOlt.OWtNG A~f MOD~LS FOR ROUTINES TO SHUTDOWN AND RESTART
THE TSB/G lOP.
THEY ARE MERELY SKELETONS lLLU~TRATlNG THE
PRO Toe 0 L . AN 0 TIM I NG NEE 0 EDT 0 coo R0 I NAT E . WIT H THE $ p t s·- "R-OU "j NES ..
RC tS THE SELECT CODE OF THE INTERCONNECT RECEIVE CHANNEL.
SC IS THE SELECT CODE OF THE INTERCONNECT SEND CHAN~~~ •. :.:
...••
..
** ..
.PbwER~F~IL/POWER-UP
RECOVERY
ROUTIN~
.
••
••
•••
&012
•••
801"3
*'
0014
..
THIS ROUTINE PROVIDES AN O~OERLV SHU1DOWN OF THE 1/0 PROCESSOR
9015 * WHeN POwER FAILS.
WHEN POwFR RETURNS IT RESTORES THE PROCESSOR
8015" " •
TO AN E Qur VAL~' NT STAT E', RES TAR l' S T H~ I NT F. ReO NN F. CT I N- ONt: E R" f ~ I t H-- .
1Il0tJ
• . THE SYSTEM PROCF5S0R, ANO HESTARTR THOSE P~RIPHERAlS FOR WHICH.
8~1~
* RECOVERY IS POSSIBLE. POWER FAILURES DURING A RECOVERY ~BORT
9019 ..
IT. THE POWER ... UP PORTION IS RESl ARlEO AFRESH WHEN POWEH'~t11JRN'S
-e
,H,20
8021
0022
8023
S024
1It025
0026
~~j27
ta02~
*
..
POw
*
OST PowTl
ERB,BLS
SOC
..
'*
...
..
..
..
~039
..
B0~~
j04.6 t
..
...
80 .. 2
...
t/O
PROCESSOR
**
TEMPORARILY SAVE
(A) AND CB),
fE)
AND
CO)
REGISTERS
..
CHECK IF INTERRlIPT OCClIRRED WHILE RECOVERING f-ROM A PREVIOUS
POwER FAILURE. IF so, THERE HAS AEEN NO SySTEM ACTI~ITy ANO'
TH~ ORIGINAl. SHUToOWN STATUS 15' STILL VALID WITH ONE POSSIBLE
EXCEPTION. IF THf SP COMPLETEO ITS RECOVFRY BF-FOME THE NEW
F AlL UREA NOR E TI J RNED 'r 0 ITS RF ell VE 0 R I v f R, I T MIG HT tot AVE SF-r
THe IOP.S SEND CHANNfl FLAG. THIS CANNOT HAPP~N AS LONG AS
PowfF-l. THE FLAG'S VALUE WIll NOT OTHERWISE CHANGE. THE
top DOtS NOT RECORD r TS RECE r VE CHANNEL FL AG, TRUST'I NG 'TH£ - .SP TO RESET TT CORRECTLY.
~0 .... 3
a0~4
LDA POWFf
0045
JMP
POI.ttf)3
904.66
801~1
SZA
,) MP
PO~!D~
00~d
I.DA
paw
a0~9
ADA
POW~l
005(1
~SA
:.}051
JMP POWDl
ADA POWR2
filA
i)CiJ52
i-305J
SSA
B~54
JMP POWD2
:1055
..
H~56
..
ti;057
..
0~J58
...
..
~H:'59
POWER~UP1
..
S034
B03~
SHUTDOWN THE
JNS
~03J
9037
IS INTERRUPT FROM
YES
POWlIP
•
....
'03t1
~0.35
~036
NOP
SFC -1
.j MP
9029
,.1031
}:f032
AGAIN.
FAILED FROM POWER-UP ROUTINE
SF.FORE I N'TFRCONNt::CT RESTORED'?
RETAIN P Rf V I 0 lJ 5' S TAT lJ S
~JO ,
FROM OUT-Of-LINE RF.COVERY?
YES, CHE:.CK SFND CHANNEL ONLY
VE::S,
NO, COULD INTERRlfPT
BE FROM IN-LINE
POWER-LIP CODF.?
NO
YES
IS IT?
YES, CHECK SEND CHANNEL ONLY
4-39'
., 0 6"
..
.,061
...
806:?
"
p n~ F R F' AIl t: f) f) URI "J G Nn RMAL
RFCORD THE 1/0 PRnC~SSOFPS
~
Y:1 T [" MAC 1 I V TTY
STATlJS~
8063
...
",064
POwDl STB POW EO
e~65
8067
rJLO POWl1
f)Sl POwAA
LOA POIlI
e~6ti
5TA PowRA
SAVE POWER-UP
RESTART ADORF.SS
i069
8070
8071
l. I A t
~AVF.
~066
5TA POWSW
LOR ClF0
e~72
8073
0074
8075
SFC 0
l.on STF~
STO pawlS
pown2 CLA
8076
Sf'C SC
S077
S07tJ
STA PowFL
INA
...
8"79
"'0A'"
POW03 CLC
80fil
HLT
'SAVE
REGISTERS
THE
SwtTC~
REGISTER
NOfE. IF
INTERRUPT
ra BE ON
AF'E~
~YSTfM
O~
OFF
~E:.COVE~Y
SAVE lHt:. STAlE
OF THE IN1ERCO~Nt:.CT
SENU C~ANNEL
~
~
FLA~
E IN1FHPUPT ANI.)
WAIT FOR Pf1wER-l,JP
f:NABI
4-40
~
8001
1002
~00J
f6e"'4
10~5
.,006
SQJ07
S00a
80ti19
8010
9011
111012
6013
8014
8015
9016
0011
S0ll:)
~0t9
.
*.
•
eLB
IN8,5IR,RSS
JMP « ? »
8021
SFS RC
JMP ..... 3
8~23
LIB RC
8024
8025
5T8
Oll)
RRR
ANO
(6026
powrl
OMAT2
15
-7
orA SC
STe sc,c
803~
*
0033
..
8034
•
8035
.
~tJ6
*
RCHNA,t
RC
RC,C
POWT1
RRS
ARS
80~3
XOR R
80 .. 4
8045
8-046
tJ047
RlB
RAR,SLA
CLA,RSS
eCA
905VJ
8051
•
8~52
*
8~55
"~55
005!
S~58
8059
DMA-ON~INTtRCONNECT
IT
Ma v t: I.. A S1 D MAD IRE C T ION R1 T
TO A(f6) ANO DMA ROUTINE fLAt;
(MODULO
4)
INFORM SP OF
TO
lOP'S
A(~)
AND
A(t)
.
OMA-ON~lNTFRCONNECT
STATUS
srA
RESTORE THE lAST WORD SENT
(OUTSIne:: OF A OMA TRANSFER)
ANO CLf.AR THE RECEIVE FLAG
POWT~
WAS lOP'S OMA ROUTINE FLAG ann
~ SP IN OR BEFOR~ Irs ROUTINE?
NO
YES, NOTF. DMA TRANSFFR
Tn BE RESTARTED
*
..
'*
'*
."
*
..*
STATUS
SAVE
HE-MOvE DMA
DIRECTION 81'5
8041
..
SP 'NOT THERE.'
TtM~ .. OIJT1
YES, ACT AS TF '550' RECEIVED
~O, WAIT FOR SP'S
Rt:· SPONS t alE FOR Rf" Sf TTl NG THE lOP t S RFCf 1 'if CHANNFL FLAG OR ~ .
1042
8053
8054
***
NOT*
LEAVING IT CLEAR AS OJCTA1ED nv THE powEH"OOWN STATUS.
8039
8040
804Q
PROC~S50~
THt SP WATTS FOR THE IOP TO RE~TORE THE LAST wnRO S~NT ON THE
IOP'S RECFIVE CHANNEL COUTSIOF. OF A OMA TRANSFER). THE SP IS
LOB
OTB
STC
LOB
903~
B04a
AND RESTART 110
II
9022
SQ137
~TA1UR
•
powUP
·CLA,INA
NOT~ INTERCONNfCT STATUS
STA POWFF
RESTORED IF RECOVERY ABORT~O
9TC ~ .
ENABLE POWER~FAIL I~TERRUPTc
elF RC .
READY RECElvr CHANNEL
(. ...,:. '/J c: t...F ~
1." H 1./$ 1.: -; 1111 T I:.RIt l) (' r·s
* THI:. SP.REQUIR"ES A CERTAIN AMOUNT OF TIME TO SHUTDOWN, ENABLf!
•..- A -P·OWER~UP· INTER~-UPT, RESPONOTO IT, AND CLE-(R ·lTs"'~REcE-1v.T·. ;:~;7~"·
• CHANNEL· FLAG
THE WA I T LOOP AELOW Kt.EPS TH~:.10·P·:: FROM SENf). %?NG
• . ITS OMA .. ON.INTER.CONNECT STATUS UNTIL THE SP IS REAOY •...' THE· ~.
..
sP wILL' THEN wAIT FOR-THE lOP's RFsPONSE, SYNtHRONttING-eofH
..
INTE·RCONNECT RESTORATION ROlJTJNE:.S. \IF THE WAIT TIMES OUT,
.. THEN THE SP IS NOT CURRENTLY TIME-SHARING (SHUTDOWN OR
•
CRASHFO)-· ANO·THE lOP SHOULD RESTORE ITSELF TO-THe fcC! .-~-~.
• (POST~SySTEM SHUTDOWN) STATE.
.
e~20
8021
6028
8029
9030
J031
RLSTORE
"4-41
806'"
8061
8062
8063
'064
8"65
8066
8067
8068
1069
,..
,..
•
•
•
•
•
.
..
THl SP wILL RfSTORE lHE SP SEND/lOP HECFIVE flAGS EITH~R .5 AT
pnwfR-DOWN OR AS NEEOFD TO RtSTART A n~A TRANSFER. THEN IT
RESTO~ES THf LAST WORD SENT TO THf lOP'S SEND CHANNtL.
THE tOP
MUST lEAVl ITS SlNO CMANNEL FLAG"SEt OR CLEAK"IT ACAIN, AS
DICTATED Ay ITS POWER.DOWN STATUS. THE REMAINOER Of THE SPtS
R~COVERY ROUTINE TS LONG ENOU~H TO ENSURE THAT THE lOP HAS TIME
TO· MAKE' THIS oEr.lsION BEFORE THE SP HERUMES TIME';;SHARING.·
LOA POWFl
807A
S-FS -se
8071
8072
8073
JMP
StA
8074
,,075
8076
8077
le7a
JMP
LOB
OT6
8Te
POWIt1. CLC
ISl
.~t
POWUl
SCHNA,l
sc
se,c
se
POWFF
LOAD STATt:: OF SEND CHANNEL FLAG
WAIT FOR
HANDSHAKE
WAS SEND fLAG Cl;EAH?
NO
YE. S, Rf.STOHE
THf LAST WORD SENT
A.NO CLEAR THE flAG
JNHIRIT SEND CHANNEL INTERRUPTS
NOTE INTERCONNECT RESTOREO
*
•
•
...
PERFORM OFVICf
8083
8084
•
«APPROPRIATF. COOE »
"~85
POWT~
~EP~AT DMA ON INTERCONNFCT?
POWU?
NO
< APPROPRIATE r.UOf> YES
p O'WIJ2' ""C L A
RACK
STA POWFF
IN",LINE
LOA PowSW
RESTORE THE
OTA 1
SWTTCH REGTSTER
8079
8080
8081
808'2
8"86
8087
8088
8089
8090
1091
1092
80QJ
8094
8095
8096
8097
8098
...
ROUTINES
RECOY~RY
ISZ
J~1P
LD.A PowE.O
elf)
SlA,ELA
STO
OLD POWAR
pow'IS NOP
JMfJ POWio(A,I
RESTORE.'
eEl
AND
(0)
(A) ANO (B)
REST~R~
'STF 0' OR 'eLF PJt
RES lJ '4 E TIM f; - 5 H ARI NG
8~Q9
...
8100
8101
POWRl ABS .. powuP
POwR~ ASS POWlJP-POw~1
...
POWFF OCT 0
c0 WHEN NOT TN POWER~UP ROUTINE
...
-1 BEFORE INTERCONNECT RESTORFO
-2 DURING OUT-OF-lINE ReCOVE.Rv
•POwT l' B-SS 2
POWT2 fQU ... 1
POWFL BSS 1
-I IF SEND CHANNfL FLAG WAS SET
P'OWSw BSS 1
SAVES SwITCH RlGIS1ER
POWRA RSS 1
SAYES POWER.UP RESTART ADDRESS
PowEO RSS 1
SAVES CE) AND (0) REr,YSTFHS
SAVfS CA) AND (8) REr,lSTE~S
POWlS ass
81r,,2
Sl~3
el~4
8105
8106
8107
1110~
81A9
elle
8111
·C112
8113
8114
811!i
8116
1117
.~
•RCHNA·
OEF" RCHNO
eLF@
DfF SCHNO
ELf @.I
STF~
5TF QI
SCHNA
->
a>
LAST WORn SENT ON RC
LAST wORD SENT ON SC
4-42
~201
~002
~00J
•
'II.
...
INTERCONNECT DMA ROUTINE
••
•
•
:o!~;J4
1'005
JIJ96
e~~7
a0~8
2~~l9
20113
9011
~et2
•
•
*
*
*
...
*
..
PFRFORMS A DM~ TRANSFER FROM (TO) THE SP TO (fROM) T~E lOP.
THE RECEIVE'C~ANNEL FLAG MUST BE CLEAR BEFORE ~NTRY r~·TMI~
IF- THE. TRANSFER IS FROM THE· SP ( BCt5) -.-1 )-• . --... ON FNTRY CAl = TOTAL TRANSFfH LENGTH (POSITIVE WORDS)
'~OUTINf
(B)". BUFFER MEMORY ADDRESS (BITS 14p0) ANO
'tRAN~FER OIRECTION (b'IT- is' .-~l:~IF-FR·OM--SPY
IF A POWER-FAIL A~ORTS A 1 RANSfER , IT IS REST APTEDF;~O"'·;.:;<;:
TH~
.. . "
BEG~~NING.
•
20t3
'3014
0315
J0\..5
2017
d ~j t 8
B0 i 9.
••
RF' S TAR TAN I NT E ~ RII PTE D T RAN SF F. R BY
3U2Z,
,.,
JUMPING TO THE FOLLOWING LABEL.
jj~21
H:d 22
'Jv123
Df-oiAXR NOP.
•
CMA,INA
OST DMATl
I Sl OMAFl
DMXRS
~024
YES
STC 3
~o,
~021
3
CLC 3
OTA :3
i6~)2~
LDA' DMACW
~Qj2q
nTA 7
STC 7,e
SFS 7
!3~26
~t ~:3 10
: ra3!
NEGATE TRANSFER LENGTH
FOR POWER~FAIL'RESTART
IN ROUTINE COMAFL NO~ 000)
SAVE
NOTE
SZA,RSS
JMP DMAXl
. nrA
HZ?,S
ZERO~LENGTH
t 0 L0
OUTPUT OMA
WORD COUNT
OUTPUT DIRfCTION !:iIT
ANO RUFFER ADDRESS
ASK FOR 'STC' ON EACH WORO
AND 'CLC' ON IF.RMtNATIO~
~TART
OMA
WAIT FOR
COM P LET ION
.
Co ~c.
::;
ADVANCE AOUTTNE FLAG TO
l:}034
~JOP
(ROLLOVERS DO ,OCCUR)
J"J35
.]MP
~036
~U37
:.oj 0
J ,"3
r.J£"<3Q
:il']" ~~
~I£)~
1
d0~2
DMAX,
•
•
DMAT l ' AN.D
TRANSFER?
.JMP ... -1
15Z I')MAF-L
g032
~~33
;":
f~EN
D~IAXR,l
I1t-'1AFl. MUST F'OLLOW DMA'T2 FOR POWER~FAIL PlJRPOSE~
*
DMAT1
ASS 2
SAVES TRANSFFR LENGTH
OMAT2 ~QU "'-1
SAVE$ SUFFER ADDRESS
nMAFL nCT 0
7ERO WHENEVER SP SENDS tINI'
DMACW ASS 12~~~0A.~C
4-43
.
~'.
lOP
CLF RC
•
•
•
OLD OMATZ
RRR 15
AND =7
reaoy receive channel
•
•
•
prePdre
Interconnect
UMA in~o
ULU UMAT4 prepC!lre
~~R
tnterconnect
15
Orw1A info
ANU • + ,
wait for
SES CHI
~MfJ -u--l
handshake
CLA
..JMP *-~
OTA SC
OLC SC
STc SC"C
I Nth SLb. t-<~S
«time out»
SFS ~C
LIH QC
STR p()WTI
LOA ~ChNA.I
sena i t
Llts Chi
load lOP's
Info
It for
hcnCShdKe
\ilia
DfvlA
send
OT~ ChZ
STC Ct-'2.C
OMA infO
walt for
SFS CHi
~Mt-' *-1
handShaKe
info
OTH RC
STC ~C.C
save ~PLs info
res tore
receive channel
last sent word on
LOti powTl
•
•
CheCk for
UM~ r e s't~r t
~C
CLI:::..t:.J.EV
ASS
1:j~E.AK
Ul:.vlCE
~SSIGN
k~£
R~E
(JUMP
DUM
uISCONNt:..CT
DIS
BAN
AwA
bANNER
AwAKE
4-58
.
.
----~-~--~~-----
.
: SYSTEM LI BRAHY.:
..-.....
o
------~---.--
SAVE
CSAVE
G~T
APPEND
HE.LLO
t;YE.
SAY
CSA
GET
APP
HEL
fJYE
J-IUJ.lGE
PU~
k~NUM6t.k
REN
NAME.
NAM
CATALOc.;
L.IBf.
LOGP1=LOGP~
4-61
This set of 32 t~bles. one ~or each user, contains relevant
information abou~ the vartous terminals. The structure o~ the
t~bles
is as fol lows:
~oro
~umbec:.
wore
~cme
lJe~~c.J.etlQo
o
'iF LAC,
lJser Cit
1
'! TNUM
~ort
?DISC
Aeeress of 5*ap area on
(~ words)
numoer In bits Ie to
b
oiSC
of program
POints to last used address 0+ proqram
When In core
4
6
~Iags
110
User 10 (=0
?NAMt
.)
)
7
10
0.)
0
if
no current user)
character (or less)
oroQram
name
11
12
?TlfVit.
)
)
s~artjn9 time
(set to DATIM and
DATIM+l at LOuON)
13
?C.LOC
User's
14
?RSTR
~estdrt
15
?STAT
user status
16
?LI"'K
~otnts
17
?PLE.V
~riority
~UN
time time-out ClOCK
aodress for suspended programs
to lLlNK of next port on
~ueue
of user on Uueue
In the Queue. contains
program type (temcorary storage of
It user not
?~TAT)
20
'?OREC
kecord Size
21
?OUTfJ
LOgical unit number or diSC address of
ouT= f i Ie
23
?NRE:.C
Numoer of records in OUT= fl Ie
?P~IU
uwner IU
o~
?kTIM
~esponse
time for
25
o~
OUT= fj Ie
program in
4-62
ENT£~
~wap
area
2b
?TEMP
27
))-
30-
)
Tempo ... a .... es
used.by
Librc!')rv routines
?FLAG bIT DEFINITIONS
Bit
~umbec
t:lcme
OCJC:ClstJ.QO
0
TERR
~rror
1
CFLAG
Program in swap area is compiled
2
HFLAC,
Ht.LLO is runnlnQ
3
TAPEF
User is in tape mOde
4
UNA8T
Unable to
Is set
detected on tape input bY user
~bort
user when set
when comoilation .~ occuring
When comp.ler executes a diSC routine
(~I lows port a Chance to aoort
just
prior to runnlnq of diSC routine)
FILES
CHAIN
ASSIGN
when UPdate Last Reference Date For files
is being run
Is not set, but simi I a ... e+fect (i.e •• unable to
ebort) when Library routines are runnIng - except
LIBRARY
CATALOG
+ro,;, (.
user <.
console -(
5
7
GROUP
L>IRECTORY
REPORT
- STATUS
ouT \lilT
user output buffer +ul I-output wait
PACT
~ort
A8TRY
needS to
be
orocessed by SChedule ...
Abort attempt that
UNABT 0'"
shoul'd
4-63
has been delayed
Just be f.lagged due
due to
to Pt3FLG
(-or last chC!nge
8
uFCHK
u.rty f i I es
9
CHNFG
CMAI~
10
~PAC(J
List has a I loeated an output bY (- (- er for the
user
11
MblJST
useo to (-lag di se trans .. er error s
12
t-J~FLG
bkK.
13
(,;~fL6
SYstem operator enabled the or eaK Key
14
OU1=~
The
15
l~E.J..
?TEMP:
Used (a long with '?RT 1M) to 'save var, ao I es when
4-67
O~~N.
ena
6kOU~, LIHRAkY, STATUS, DIRECTORY,
are swapped out.
C~lALOG,
~£PukT
w~th e~Ch item in these tables
is a symbol which is
to the correSPonding number ~~ the item. For example:
Assoc~atea
EQU~tea
?FLAu E:.QU 0
?TNUM t:.CJU 1
?TEMP i:.<.;U clts
These symbOls are primer. ty used for adjusting pOinters to the
table. FOr example, I~ the 8 reQister contains a pOinter to the
LINK entry Of some user. the instruction
~U8
.+?lU-riLINK
wt I I pOint B to hiS Iu entry •
• is a SymbO I 10CC!lteo I n base page at the 0 entry of e tab I e of
constrants from -2b to +~l. A word containing the value Nt where
-28~NS~1 c~n be rc+erenced by .+N.
4-68
The ecuipment taote (EQT) Is the area of memory whtch describes
the resources available to, the System.
It res.d~s In 'oc~ttons
100
17b as follOWS:
100
101
'102-131
13c-141
NIOT
NDlkT
ADlAl
DKT8L
DAOSL
142-143
144
145-1:;1
152
MAGSC
153
NPORT
1S4
OLf'4SL
SY~lO
YE.Ak
155-1Sb
uATIM
15 gl
HOATE
100
SLEt-JT
number of 10 tracks
number of directory track~ per ajsc
AuT address table
There is one word in this area for e~ch of the
& discs. When the wora is zero. the particular
diSC does not exist. otherwise, alts 1~:8
contain the high ~rlortty select COde ~nd 7:0
the un i t number.
cl,SC address of system library
len9th of system I tbrary in + olOCks
A ten-Character system identification.
ni9h criorlty select code for mag tape. 8tt 15
is set i f console Is a terminet.
Two's comp1ement of the number of ports on the
S'yS tem.
Tne por t s ~va i I ab I e are numoer s 0 thru
-NPORT -1.
Year of the century
Time of year. The first ~ord IS the hour of
the year4 and the secone is the number ~f 100
ms units in the hour minus 36000.
hour 0+ year that the system was last
h'bernated.
o says that the system has ceen sleet. -1'that
I t has not.
This word IS mooified only by the
sleep and reload procedures and ensures that
the system may no~ be reloaded from disc if it
has not ~ee~ slept.
F'ol lowing the eQuiPment table •• n locet*on~ lb1-17~ are another
set of words whiCh must correspond with the IQader. They are
defined ~s fol lows:
Ib1
lo~
163
E:.kIDX
1~4
~HAD
16~
GMQBP
160
1b7
Dl~CA
17U
MHUS'Y
core dddress' in the loaaer of the final disc
bootstrap.
Core address of the first 10dder segment in
the Master segment Table (MST).
~olnter to salvage portIon 0+ ~ST
Core address of the MOVing Head Disc Table
(MHldL)
DISCb
Lore address Of the routine to qet a buffer
for diSC error messages.
Lore adoress ot disc driver entry po'nt.
~ore adoress 0+ disc oriver
interruct entry
J,Jolnt.
[)fsc driver bUSy flag.
4-69
171
~WO~()
17~
UREDP
173-174
175-170
EQTAO
count fOr disc driver.
address of oisc driver auto restert entry
po,nt (used by cowerf~il/auto ~estart routine).
Uisc address of the Equipment T~ble
DiSC aadress of t~e ID~C T~ble.
~ord
~ore
4-70
Tne Master Segment Table (MST) is a 6~-word tacle resident In
t~e loader.
It Is the first portion of the bootstrap and ts
potnted to by the ~Irst word of tne EQutpment Table. ·The ~trst
wOrd Of tn& table contaIns - th& number of s~stem seg~ents. £ach
group Of 4 words fo. lOwing the first word. has the following
~ormat:
WORD
1
2
3-4
length of segment in -words
absolute, be~lnnlng core address of tne segment
diSC address of the se~ment
There are 16 segments, oraerea as fot
SEGMENT
1
i:!
3
4
5
b
7
8
9
10
11
13
14
15
Ib
lo~s:
Interrupt locations (2(t!r "to" JO(t:s»
System case page (end of I:.<.IT "to" 1711(8»
System linkage area "(4tl02Un "to" 40J,7(ts)
DiSC ~rror Recovery area (~bOOO(~) to (25117(8»
System segment 1 (end of OIRECT lito" 41711(8»
System se9ment t:!. (42000(d) "to" 517"17(8»
System segment 3. (~~OOO (d) "to" b1177 (8»
System segment 4- (b~OOU(d) uto" 7J.777(tt»
Sy stem seqment :l (7 ~OU 0 (to "to .. ·/7b17 (H) )
E.Quipment Table (100(8) .. to" 17b(tt»
L)irect Taole (.j04ul(~) uto" 31S30(b»
Loaaer seqment ~ (l~~uO(~) to 23777(d»
Loaaer Segment 1 '(~OO(J(H) "to" 14~o7(C:n)
Cofa LJumo Segment (~4000(~) Uto" ~4705(a))
U8SC ariver (dbOOO(d) lito" C'=!7617(ts»
Note thet this incluaes all core resident portiOns Of the loader
arid· system e)(cept tor • ocat ions 14::'00 (b) uto" 1':J777 U:5). Tne
first 1000(8) of tnese wordS comprise the diSC bootstrdP and are
resident on blOCKS 1 ana c:: of each diSC. LocCittons 15~uO(8) "to"
lS577(~) may only be usea for
temporaries.
4-71
AlII.
~UE.~Io
MUERT0. as the name suggests. Is 6 table of all system halts.
All of the system halts can be referenced by tne label "DEATH".
~UERTO explains the meaning Of eaCh halt ana gives an
indication
of possible recovery or fai lure. The follow,ng is a COPy of tne
t.:!Jble:
5 -
ll~
301"i
31!"(
3c:B
34~
-
3bb
318
40~
42H
44H -
Erroneous, non-recover.:!Jble system transfer has
occurrea.
A Darity error has occurred; CheCK the hardw.:!Jre.
unexcectea Interrupt from the processor' Interconnect,
take a cola dU~C of thiS unrecoverable system.
D,sc driver Is bUSY. ~ecovery not poss;icle.
DiSC called is not pesent. NO way to recover.
Unable to read diSC recovery routines into core. No
way to recover.
Disc error causing tne system tables to be
incompatiole. ReCOvery is out of the question.
Powerfat I nas occurred. check restart SWltch·Position.
~ad AUT diSC address generated.
kecovery - no way.
ImDossiole condition occured. NO way to recover.
owner 0+ a a'rectory entry is not in the lOT. NO
recovery •.
lOP aSked fOr non-ex, stent RJ£ command c1
NO recovery.
4-72
wo~o
0-1
2
3
4
5
6-1l
•
•
•
42-47
Two-word absolute sector number o~ the
fArst 128-word h~rd~are sector on logical diSC 0
POints to select ~ode/unit number In DKTBL for
locteal diSC 0
numcer of sectors/cvllnder
number of sectors/track
current cyl 'nder position o~ heads for loglce'
diSC 0 (used only ~or 7900 discs)
Same as 0-5 app.led to l09;c~1 disc 1
Same as 0-5 applied ;to 'ogtcal diSC 7
Note that the address In the first two wordS of each section of
the t~ble is a sector address and m~st be divided by two to
obtain the blOCK aaaress. The last: 'entry is fol lowed by ~
truncated ntnth entry, MAXSC, which, always contains ~ double
Integer speclfytng the ~.rst absolu~e sector numoer Which does
rtfft ex i st." The actua I number s ~or the J I< I nds o~ a I scs used on
ACCESS ~re as follows:
~b~~
WORDS 1-2
J
4
l~!lg
u
0
0
l~O~
~9J.~4o(10)
93384.1(10)
ItS67bO(10)
3d~'ro
( 10i)
Ild36~(10)
260140(10)
!:;)d464 (10:)
37J~cO(lO)
4669(JO(10)
7 19!J2 ( 10:)
97440(10:)
177552(10)
c36736(10)
~60C:bO(lO)
116":1~d(lO)
3~tilO4(lO)
653660(10)
414~8~(lO)
400 ( 10)
1 .3 0 4 1 a ( 1 (} ,)
~c ( lOi)
(1 u)
4d ( i 0;)
~4
1'=*4odd(lUi)
" 4-73
~9~920(lO)
144 ( 10)
UE~ICE
TABL£ INITIALIZATION
The Non-shareeble uevice Table IS a teble of 321 words consisting
0+ the number of non-shareeble devices and a five word entry for
each device.
The 1/0 Processsor Confi9urator bUI IdS thiS table
from the Information suppl led by the sYstem operator.
The table can contain UP to 64 entries. ~ach entry is
internel,y re+erencee by a logical unit number 0 thrOUgh 63.
Thp t~ble eopears as +ollows:
U\llt::'L
# of non-Shareable
deVices (neQative)
one wore
--------~~~------------entry tOr logical
unit 0
five woreS
-----~------~---------entry for logical
five wordS
un.t 1
---~----------------------~----------~--------entry fOr last
log.cal unit
five wordS
------------------------
During system Inital iZat.on. the loader orogram wi II send the lOP
a pre-emctory re~uest With sena device table ~uo-code. Tne lOP
wi"
respond with the deVice table. creceeea by the number of
pOrts configured ano the number of non-Shareable devices
speCified. The entries in the teble have the follOwing fields:
o
. C.ONTt.t"T
device
oeSlgnator
1
select COde
WO~D
[)ESC~lPTION
Tne deSignator .is composed of two
letters and one or two diQlts.
octal 101 Is subtracted from the ASCII
v~lue of each letter, allOWing COd9ng
0+ the destqnator as 3 five-bit fieldS
In bits 14-U. The number. Which Is between 1 and ~l. is not coded.
Bits 1-0 contain the select COde 0+ the
device. ~it 15 is 1 if the device
supports ~nput. bit 14 Is 1 if tt
supports outout, btt 13 is set if the device user is trapping errors and en error
occured on hiS lest use of this device,
bit ld is 1 .~f it supports CT~ functions
but not output.
If Cit l~ is set, so is
bit 1't.
4-74
2
Maximum record
si~e
3
assignment
The maximum record size that can be
requested when USing the device.
Th.S entry can have one
o~
the
~o'low'ng
va~ues:
idC~de
1
o
-1·
4.
tty table
only users w'th this idcode
can helve access
device r~served
~or R..JE.
all ~sers can
have access
no user can have
access
If o. tne
device is not bUSY; i~ it
.n use by R..JE; otherwise i t points to the
?FLAG entry o~. the control I ing user.
The content s of the dev t ceo tab J e can be d i sP' ayed by use of the
Df::VIC£ command.
4-- 7 5
SU~PLEM~NTAkY
NOTES ON
5-1
~ASIC
I.
SYNTJ.\X
The Qeneral process of ~nalyzinQ an input to the lanuage processor .s displayed jn the flow charts.
The annotations in the I istinq exPlain the actions
of the SUbroutines, whi Ie the core map and sectjons
on Internal representation describe the obJects/
structures being created or manipulated.
The ~ASIC
syntax, in conjunction with the listing, exolains the
method of ieent.f'cation·and recognition Of legitimate
bASIC statements from the Input string.
II.
PHA!:>t:. 2
A. Lomp I t at ion
The prel iffllnary section of CMPLE prepares for execution
of the orogram fOI lowing a successful compilation. Nul I
programs reQUire no crocessinq.
If a seQuence number
fol lows the kUN (e.Q •• ~UN - ~~O) the interpreter's proQrarn counter is set to the first statement whose seQuence
number eauals o~ exceeds the reference, otherwise it is
set to the first st~tement of t~e user program.
If the
comMon area has not been al located, ALCOM is cal ted to
compute the space needed ane move the ~rogram accordtn~ty.
Common IS initial Izea to -51~.
If the progr~m
is seml-compilea (S~TR=~, SYMTB<>O) we may skip bui IdlnQ
the symbol table. otherwise FILTb is set to 0 so PkNST
wi I I not termlnete compi lat.on by mistaking It for decomcllatlon.
The symbol table IS then built as explained in the
listing (~e+er to the flow Chart for general loqiC flow
nno to bASIC varie~le Stor~ge AI location ~r a v'Su~1
exa~ple).
Also, at this time statement number references
are replaceo bY bbsolute eodresseS. ThiS IS faci I itated
by dividing the ProQr~m Into 3~ carts ~ne butldinQ a b4
wore table in ~kSEC (an unused storage blOCK in the user
~ree on base page) containing the first ~tatement number
and aadress 0+ eaCh part. DurtnQ compi latlon SPTR pOInts
to the program wora oelnQ processed. POinters to are stored In FLSTS and a count of them 6s
kept in FILeT. An error In CO~CI lation WI I I cause e call
to U~~~L to restore the source form of the proqram follo~ea by a cdl I to the error. routine.
If after a successful compi'~tlon at least one has been
found, BASIC cal Is the system to bUild the +1 5e control
o I 0 Ck s • f I I lin 9
I b·U t the f i f t h. s txt h, n 1 nth, ten t h •
fl fteenth, ana 's,eventeenth ~ords 0+ eaCh entry.
a,
5-2
The symbol routine nas two entry pOints: SSYMT used ~or
~unctions ana simple variables, and ASYMT for arr~y ~nd
str.ng ~ariables. Because the d'mensional Ity o~ ~n arrey
variable may not be Known local,y (e.g. MAT A=B) some
symbols may. have tHO entries.
l~ tn.s .s the case. the
"don.t know" entry will always be farther down In the
teble (l.e •• have a htdher core addres.) than It~djmen
sioned counter.part.
tie
VALUE
VALUE is responsible ~or detecting ae~jcienc'es in the
symbol table, al loc~ting storaqe for the ~alues o~ Symbols Initial izing the values o~ al I variables except
those in common.
The crocess o~ bui Icing the value table IS descrioed in the Iistin~. Note that for arrays
tn common. the declared dtmensions in the are Checked against those In the common area.
If
they match ana the dyn~mlc dimensions are conSistent
(i.e. <= dec8ared dimensions) then the values are left
~'one.
otnerwise they are set eaual to those in the
. For strings. the pnY$ical length is
checked against the declared length and the logical
length tested to be less than or eQual to the Physical
length. If these tests fai I. the PhyS Ical length is
set to the declared length and the ,ogical length is
set to zero. Smple variables In common are left
untouched.
several errors may be encountered whl Ie but lang the
value table. The occurrence of a' nul I symbol (bit p~t
tern of 0) in the symbol table means thdt an array symbor is used in the orogramt but never in SUCh a way that
its dImensionality can be determined.
If the second
word of a function entry is zero, no
for that function aopears In the progrdm. Arrays of
more than 5000 elements are not allowed.
The next step IS to at tocate two bu~fers for program
input and output. The output buffer has a pseUdO fi Ie
control blOCk Which conSists of the first e.even wordS
of a file table entry.
1+ the output deVice is the user
terminal. the third wore of the bloCk (logical. unit number)
is set to -2 a~d the record length set to 1~ bytes.
If
RU~*OUT=~i Ie nbme* has been spectflea. then the ?OREC and
?OUTP entries of the user teletyce table Indicate the
device ana logical record size to be used for the program
output device. A buffer large enOUgh to hold one loqlcal
record is al located. except ~or .ASCII diSC files whiCh
reQuire a 2~b word ouffer to contain one Physical btock
(ASCII f.'es are blOCked). lhe routine STFC~ IS responsible
for
~in9 the entries in t,he fi I€ contrOl block.
If the
.'1
5-3
prograM was Ch~lNed to. and the output oevice ;s an ASCII·
fl Ie. then the current disc address is set to t~e first
diSC block which was not written to by the CHAINing program.
diSC
T~e
.nput buffer. only requires a two word control blOCk
con sis tin 9 0 f the ten t.h and e I. eve nth w0 r d s 0 f· a f i I e
table entry (current buffer oOlnter ana 10Qlcai ena Of
reCOrd).
The b~ffer al located is the same size as the
out~ut buffer.
During program execution, the variables INFIL and OUTTH
pOint to the tlrst lIoro of the "fi Ie tarde entry" for
the Dr09ram in~ut/outout aevices.
The non-existent portions of the entry are not needed ana are never referenced.
OUTT~ pOints to the entry for
the outout deVice. bit 15
IS set
if that oevlce I~ the user terminal.
INFIL is set
to zero ~nd pOints to the input device entry only during
execution of an ~NT~w, LINPUT, or REA~ statement.
NoTE: See ~SCII file handl ing for special use
of INFIL and OUTTb
c.
l)ecomp i I at ion
are oecomPI led when an error occurs durinq comoi lation, bui'alnq of the fi I~ table, or ~hen the program
is to be mOdlfiea or S6ved in the user library. Sinee
in the first of these only a portion of the program is
comPI led, the pOinter 5PTR is used to determine hOw
muCh to be decompiled (a ful Iv comPI leo program alwavs
has SPTw oointin~ to the first word fol lowiny the oroqram). The proqram is ~oveo so that SP~OG=PdUFF (no
common area).
lhe orocess is ex~lained in tne I isting G
~rograms
I).
rhe wout i ne PkNST
is used by bOth CMPL~ and DCMPL to scan the program
skiD over those portions not affecteo by compi ling.
~kNST assumes resconsjbj Ijty ~or recogniZing extr~ <~ILES
statements> and that are out o~ ordero
If such· an error condition js encountereo. SPT~ is set
to potnt before. the st~tement which ca~sed the. error (it
hasn.t been compi leo).
Then PRNST cal Is UCM~L. which
cal Is P~NST.
The stdtement c~using the error is not
seen this time, so ~~NST and ·DC~PL can eXit correctly.
PkN~T
~nd
5-4
III.
I:. Xl:.CU 1 ION
A.
M~ln
l.oop
upon completion O~ the value assignment In phase 2. controt trans~ers to XEC. A~ter printing the program name
(unless the program was CHAINed to) XEC proceeds to init i a I j z e t he ~ i 'e· t db Ie. Abu ~ ~ er the s I z e 0 ~ a· I 09 I c a I
retord Is allocated for eaCh ff Ie, ·except ASCII drse
f.les which reQUire bu~~ers of ~S6 wordS regardless of
.lOgiCal record size. Pointers to the word fol'owing
the bu~.er are placed in wordS nine and ten of the ~ile
table. The ~irst woro o~ t~e disc address o~ the record
in the .bu~~er (word ~) • s set to 100000 (octal) to indicate that no recOrd IS present. Word 17 Is set to zero,
"indicating that no:end-o~-record/end-o~-fl Ie exit has
~een specj~iec.
word 15 Is set to 0 as a nul I protect
nask.
Following the preoaration o~ ~tles the initial execution
status is set. The initial execut~on stacks are claimed
~rom free user· sPdce ana pOinters are set to the first
positton counter (CHRCT) Is set to zero by outputting a
carriage return. Phase· a has already set the bASIC proqram pointer (PkGCT) to the ~irst statement to be executed.
Execution of a statement Simulates the execution o~ an
instruction on a 'BASIC machine'. lhe seQuence number
ot the statement referenced by PRGCT is saved for posSibl~ use by the error routne.
PRGCT is aavanced to
reference the following statement. The type of the
current statement is used to branch to the appropr iate
routine via d Jump table.
Individual statement routines
return to the .top of t~e loop.
~.
5tatement execution
execution consists Simply of evaluating the formula W~lch is known to contain at least
one assignment OPerator and to have type compati~t 1Ity (numeric vs. string) by Its accePtance bY PhaSe
1.
statement> execution forKS on the symbol ~ol 'owing
the IF. The construction 'IF END' causes the following:
the ~ i Ie referen.ce'·.i s eva I uated and tested for ex i stence as one of the oroqram's reouested files; if a
legitimate reterence. the statement reference fol lOwing
the THEN is placeo In the end-of-f. Ie word of the
~ i Ie's tab lee n't r y •
The con s t rue t ; 0 n • 1 F ERR 0 R' c au s e 5
execution consl~ts of choosing a
statement reference to replace the program counter.
For simple G010's this is done trivially; +or,multlbranch GOTO'$ thiS is done by evaluating the Index
formula and choosing the statement re+erence In the
corresPOnding I .st position.
If the Index v~lue lies
outSide the I tst of statement references, the proqram
counter remains unch~nQed.
execution fol lows the Dattern for the
GOTO except that after choosing the new value for the
prOQram counter, the Old vaue Is savea on the return
st~ck
(staCk overflow generating an error condition).
,
,
execution opens an active program loop.
The for-stack is searChed. for an entry with the same
for-variable; i+ found. the entry Is eliminated (i .e ••
the previous with thiS forveriable' Is
closed). A new ~ntry is set on top of the for-stack
(extending the for-stacK by six wordS If no entry was
allmlnated) and a pointer to the for variable'S v~lue
entry Is' put into word 1., Since the +- irst +ormula In
the FOk contains an assignment operator, the formula
evalu~tor, FO~MX.
Initializes the for-variable when
It determines the Initial value. A reference to the
statement followlnQ the IS put-Into,
word b of the for-stack entry (the start-of-Ioop aOdreSs).
wordS 2 and 3 save the result of evalueting the limit
value formula.
If ~ step size formula appears expl i citly It Is evauateo, othe~~lse 1.0 is taken as the steo
size.
In either case the value of the step size Is left
In wordS 4 and 5 of the far-staCk entry. The program
counter is set to the st~tement fol lowing the associated
<~EXT st~tement> end control transfers to the executt on COde to comp~re ,the in ttl al and
limit values (see flow Chart).
execution decides whether to iterate
a loop or close it. Tne for-st~ck is searChed for an
entry with the same for-variable.
If none is +ound the
statement is ignOred and contrOl casses to the followinq
statement. 1 f 'the entry Is +-ound, ~ny entr I es above it
(more rece~t entries) ere eliminated; i.e •• they are
assumed to be.ong to nested loo~s wlCn were not clo~ed
5-6
by eXCeedng their limit value but exited ot~erw'se.
The v~lue of the ~or-vari~ble is then ~ncremented by
the step size ana the new value tested by suotracttnQ
the limit val~e and uSing the Sign of the step size to
determine ~hether a non-negattve Or non-positive result
Indicates 'success'. l~ the result Is 'success', the
program counter is loaded ~rom word b of the ~or-stack
entry (the reference to the statement ~ollowlng the so exit Is simoly to the main execution
tooP.
execution merely loads the program
counter ~rom the top entry o~ the return stac~. An
error condition is generated i~ the return stac~ is
empty.
execution assigns vdlues to the Inout list for both INPUT and MAT INPUT. !NITF=O and
MCNT Is meaningless when executing. an ; for MAT INPUT. INITF = -1 ana MCNT holds the
number (In 2's complement) of elements of the current erray as yet unasslqnea values. IFCNT holdS
.the ordinal number of the .curr.ent item In the current
record.
(NQte that IFCNT is not cumulative over the
entire execution o~ a statement reQuesting input unless the reQuest Is met entirety by one line ~rom the
teletype).
The executor IS alSo used Oy tne
statement> executor when READinq ASCII ~t les.
The routines INCAL (used to Qet an input record) and
G~TCR (used to obtain a chBracter from an input record buf+er) operate on user terminal Input or ASCII
tile input (either disc files or devices) depending
upon tne value ot the varla~le INFIL.
If INFIL=O,
the user termInal Is the Input device. INCAL wi "
initialize tne terminal input bu~~er contrOl blOCk
ana set INFIL to point to this· fi Ie contrOl bloc~
(actually 9 wordS be~ore the control blOCk since we
always point to the ~irst word o~ fi Ie control blocks
but in thIS case we have a pseudo contrOl blOCk o~ 2
wores). bit lb o~ INFIL is set to ind,cdte a user
termanat instead O~ an ASCII '~i Ie. INCAL then readS
an input record from the appropriate device and GETCR
retrieves Characters from the bu~fer. Note that in
the case of an we are always deal tng
with the user terminal.
INFIL IS cleared before proceeolng to the next statement.
0 ~or ~ strlnQ, and
is used by tne error recovery
COde to prepare for the entry.
=
5-8"
execution assigns a value to a string
variable or a simple variable.
If a '#' fol lows the
t::Nlt.:R, the user.s port number (0-31)
assIgned to the
first variable. The is timed and the
length of t i.me it took to respond (, n secondS) t s ~s
Signed to anotner varja~le. The inout analysis proeeedS
much like an Input statement with one variable. With the
notable excet*on that no error messages are printed.
Instead, the response time ver~abl'e is negated If an
error occurs.
If the user does not respond withtn the
at located time. the r.esponsetlme variable Is 'set to
-256. Parity error returns -iS1, lost Character
returns -2Sb. Tn,s is non-ambl9uOuS since response
tImes are be~ween 1 .an·d dS!:i SecondS inclus·tve. Also.
for string Input leddlng blanks are non stripped off
and Quote markS are al lowea as characters.
.S
The executor Is also used to perform
the ass~gnment for the LlhPUT statement. The common
cooe occurs after the Input record has been read.
STINF IS calleo to set :up the pseudO f i'e control blOCk
for tne user term i na I (I n the case of LINPUT from enother oevice, the ft Ie control block for that device is
used). In' either case. INFIL ·polnts to the flle,control
blOCk (or pseuoo block) with btt 15 = 1 If we'r. using
the user terminal.
The GETeR routine is used to obtain
Characters from the Input buffer. when the evaluation
and assignment are complete. control is returned to the
LINPUT executor i~ the statement is LIN~UT (LFLAG
-1
for LINPUT. =0 for ENT~R).
=
statement> execution asslens values to variables
in the .
If a file re~erence is
present It is evaluated by the routine VLFIL. which
sets INFIL to pOini to the fl Ie contro, ClOCK if the
file is of type ~SCII (INFIL =0 otherwise).
If the
file is ASCII or if the fl Ie Is f; Ie zero (corresponding to the USer terminal). the
executor is usee to assign the values. otherwise the
routine FOAT~ is used to Obtain values from either a
BASIC formatteo +1 Ie or from s. A
mismatCh in type between a variable in the and the next data Item. or a string too
long to fit into its deSignated destination, will
generate an error ano terminate program execution
(see Notes on error routInes for exception).
<~EAD
execut~on aSSigns a vdtue to a
string variable. If a f,'e reference IS oresent it
is evaluateo by the routine VLFIL. which sets INFIL to
.point to the tile contrOl block If the file Is o-f type
ASCII (INFIL =0 OtherWise). If there is n.O ~ile re-
5~9
terence or if the ~Ie re~erence is ~or ~ile 0, an inout recprd. is reauesteo ~rom the user terminal.
l~
~ fj Ie reference is pres~nt, ~ check *s made to insure
that the ~"e ts ASCII ~nd not AASIC ~ormatted (an error reslts If the ~I Ie Is BASIC). An Input record is
reeo from the appropriate device.
In any case. the
executor
Is used to evaluate the inout record ano assign the values. The sets LFLAu=-l to indic~te to ~NT~~ that we ere
really doing LI~~UT. The <~NTER statement> executor
wi I I return control to the executor
to per form necessary cleanup (I nc I ud'i no the c I ear i nq of
INFIL. ~nd LFLAb).
execution consists ot identifying
items in the print list ano sendtng them to the user
or other outout oevlce. A ~ile reference is evalu~ted
hy VLFIL (acsence of ~ ~i Ie reference or d reference to
file 0 indicates the user terminal).
If the PHINT is to
a hASIC ~ormatted ~I Ie then O<=FIL~#=l~ ~here FILE#=~I Ie
re~erence-l.
1+ output is to the user terminal OuTTa
l~ output IS to an ASCII
h6S bit IS set and OUTMP=U.
deV ice then OUT~'" po i nts to the user term I na·1 contro I
blOCk (~no has bit l~ set) and OUTTB ~oints to the ~Ile
control blOCk for the ASCII devic~.
It the PRINT IS to a BASIC file, the end-o~-I ine mOde
fla9 is turneo off ·(EOL=-l). A user terminal or ASCII
oevlce print turns on the end-o~-I Ine Mooe flag (EOL=O).
A comm~ or semiCOlon in the turns o~~ EOL
but a comma also generates enouoh blan~s to advance to
the next fle'c ot l~ characters if not ~ cASIC ~ile. A
I iter~1 string is written as ~ string of Cnaracters •• ess
q~otes. ano turns on EOL if not a ~ASIC flle~
An END
writes en eno-of-~i Ie merk to ~n ASCII aevice or ~ASIC
f i Ie.
Formula in the are ev~'ueteo and the results examineo. Formulee which are string vari~bles
evaluate to their contents. whiCh arc tnen treeted as
literal strnqs. If not ~ strine var,aole out ~it~in a
print to a bA~lC fl'e. the f'oating pOint vatue o~ the
formula ev~ludtion IS written in the file In t~o-word
floeting point torm~t.
If ~ orlnt to an A~CII device or
user terminel, the·floattnq point v~lue IS converted to
~n ASCII character strine of the cecimal eQutv~lent.
LIN,
S":;:A, TAe. end tTL are ienoreo ~or pr ints to t:sASIC fi les.
~or ASCII or term,n~1
prints. eVB'uetion of the function
prOauces the oesered action, so the return value is
thrown Bway·. alono ~ith the fo. lOWing oel imiter .~ one.
existS. For termin~1 or ASCII dev·ice prints, al. forMulae turn on ~OL.
If ~OL is on after processing the
5-10
last prnt item, a ca~rlage return line feed is printed
on a terminal, or the output record enaed for an ASCII
device.
In adaitlon, ASCII fi les must reset OUTTe ~nd
OUTMP and ASCII aiSC fj les s.t the last operation was
a print bi~ in the fi Ie control block, unless a CTL(24)
was the last item printed.
Before writing a Quantity BASIC Insures that sufficient
sP~ce Is available ~o accommodate it.
CHRCT keepstr~ek
of the current print position on the teletype line· (071) • . If the character string sent to the teletype would
require non-blanK Characters to be printed Past pOSition 71, a carriage return-line feed Is output first and
CHRCT set to o.
Bu~fer contents ere alwayS sent to the
lOP at the eno 0+ the print statement when doing ter~l
nat output. 1+ an Item sent to a ~i Ie requires more
wores than remain In the current recoro, BASIC automatical Iy advances to the next record i~ In serial mode
or exits to the end-of-record COde if tn record mode.
cPWINT USING statement> execution is covered in .the
section on the fOrmatter.
execution resets
th~ pointers to the
DATA bloCk. beginning at the statement speclfiea. or at
the first statement in the proqram 1+ none is specified,
th~ pointers are set to the first founa,
or to the out-Ot-data condition if none is tound.
stat~ment> execution involves many disparate taskS.
The forms of the may be classified as
erray 1/0. array asslqnment. array initial tzatton, and
the array functions TkN and INV. For conciseness tn
COding. al I forms other than array 110 use some common
program segments.
~MAT
Array 110 prepares each array in the list In the same
~ashion.
S~PTk
IS set to the dynamic otmenstons of the
array .(base aadress -2) and the operator fol lowing the
array tdent.~ter is picked UP for exam.inat~on. At thiS
pOint MAT PRiNT USING cal Is the formatter just as PRINT
USING does. The EVEXP routine in the formatter takes
care of PICKing UP the elements o~ the array one by one,
in rows. MAT P~!NT foe lows a separate path than MAT
R~AO and MAT INPbT.
The fol lowing operator ts noted as
scacing the elements (comma or end-of-statement) or
cecklng them (semicolon).
VCHK e~amines tne array and
generates an error i+ any of Its elements have value
'unoefined'. The dynamiC row and COlumn lengthS are saved
in 2's complement.
1+ the MAT PRINT references a BASIC
file. the array elements are written one bY one in rows.
eaCh element In Its two-word binary forM.
I? the MAT
references the u~er terminal or an ASCII fi Ie rows
aouble spaceo ana the elements within ~ row ~re
spaced or packea as noted above, each element in its
ASCII aecimal form. Both MAT READ ana MAT INPUT redimension the array, In'2's ,comolement. MAT ~EAD c~1 Is FUATA
for elemen~ values w~ile MAT INPUT transfers to the
execution to obtain element values.
MAl ~EAD #0 is treated as a MAT INPUT statement. ~TO
acts as a flag tor MAT INPUT, differentiating the first
cal I for input from sucseQuent cal Is ana saving the Input record.
After completing 1/0 on an array, a common
section of coce prepares the next array In the I ist or,
if no more remain. terminates the statement execution.
MAT IN~UT returns to the input coae to clean UP there.
MAT P~INT and MAT READ return directly to the main
execution loop.
P~lNT
~re
Array assignment consists of preparing the oestination
ana source arrays ana executinq a loop W~ICh aSSigns the
destination array elements one bv one.
The general procecure IS to aSsign a Jump to the element computation
COde to MO~, an exit address to MExIT to use after comoletin9 the destln~tlon ~rray, and a count of the elements to MC~T, in 2's complement. The code to compute
an element returns to MLOP1. MLOP~. or MLO~~ dependinq
on the number 0+ arrays involvee Which reQuire UPdating
of the element address. Each operetlon CheCKS t~e aimensi~ns Of
the arrays involved to Insure that the oper~tion
is wet I-defineo; ~nd ~I I elements of the source matrices
are cheCkec to maKe sure none have value 'undefined'. '
Matrix multlPI ,cation does not use the element computation lOOP. insteed it uses row ~nd COlumn counters to
tel I when It IS aone ano comoutes destination arr~y elements by Innt~r prOducts of the rOws ano columns of its
source matrices.
Array inltlol Ization also uses the element computet Ion
tooP. The In'tiol ,zetion oroqram firSt redimensions the
destination array (If e matrix sUbscript IS given) ~na
then chooses the approcriete constant tor the element
values.
IUN act~ like ZEk except t~at it InSists that
the destination drr~v be 'sQu~re' and sets a speci~t counter to choose l.u for the v~lue of main alagonal elements.
TkN and IN~ are henoled apart from the ot~er matrix func~
tlons. For both of these. the elements of the sour~e
matrix ere chec~eo ~qeinst. the 'undefined v?'ue'. The
source and oestlnation matrices ~rp. then CheCked ~or
trenspositional comp~tlbi Iity.
It T~N, tnen proceed to
transfer the colUmns of the source matrix to the rONS of
the destination matrix.
5-12
the bauss-~ordan ~Igor.thm with row pivoting.
procedure converts a COPy of the source matrix Into
the 'dentity matrix and converts an 'identltv matrtx tnto
the inverse by applying tne same set of operations to
both. Since the ~ource matrix Is destrOYed In the process. It is first copied Into free user space and the
COpy treated thereafter as the source. A side effect
of the copying prOduces the 'element of largest absolute
value, which Is used to com~ute a lower eound on the allowable magnituae of pivot elements. INV then cal Is ION
to set the destination matr'ix to an identity matrix.
~avln9 the side ef'fect of Checking that the matrix is
sQuare.
l~V,
~ses
T~is
Dtagon~llzation
Of the source m~trix and prOduction of
now proceedS on a row-by-row basis. The
next unreduced COlumn of the source is searChed for the
pivot element (the lar~est In magnitUde).
If necessary,
rows are swappec to put the pivot element on the main
dtagonal (tne corresponding rows of the aesttnation matrix must also be swapped).
If the pivot matrix is too
near I y s I ngu I ar to inver t execut'j on is term i nated.
otherwise, tne pivot rows of both matrices are divided
throu9h by the Pivot e.ement.
t~e
inver~e
and execution terminates the program run. user error trapping is termlated. files with "dirty" buffers in core are written.
non-sh~reab'e deVices released, last Change date ~or eaCh
~"e Is UPdated and the user's section of the FUSS taele
is clearea.
The word UQN£ is 'sent to the user termlna'
ana user not runn t ng (UNR) • s sent to the lOP. P8F'LAG,
AbT~Y. and CoFLAb bits
in the user teletype table are
cleared and contro' returned to the termination logic
in the scheauler.
execution beQlns by evaluating tne address o~ the return variable (if present), the address
o~ the program aeSlqnator, and the optional expression.
user error trapPing 's disabled (UT~AP=O) and a jump Is
maoe to the CHAIN library overlay.
The CHAIN overlay cheCKS tne va' Idity 0+ the program
aesignator. performs a directory search,on the name. and
verifies user access to the prOQram (~~A j~ needed, proqram not private, etc.). The program length is cheCked
to insure it Viill fit, the last reference date is UPoateo. ana varicbles set for return to the tn-core statement executor (protected. locked, and crivate bits set
j~ needed).' Return Is made through the SCheduler which
first checks for aoort or disconnect and remaining time
qn time-out clOCk.
The In-core executor then t~kes an error extt if an error
occurred in the CHAIN overlay and no return variable was
specified.
If a return varldble was specified. its value
is set and progrem execution continues with the next
statement.
It nCl error occurred in the overlay, any "dirty" fi Ie buf~
fers are written, the last chanoe oates updated, end any
devices releasee.
If an *QUT=* fi Ie IS in use. a dirty
buffer (if present) is written.
If tl-OUT=* file is an
ASCII disc file. the adoress of the next diSC blOck t~
saveo. The new proqram IS then read into core. The
C~NFG in the user
teletvpe table is set, non-shareable
deVice aSSignments cleared, and excess common area (if
any) initial izeo to undefined. The executor then exits
to the comPI Ie logiC.
The compile logiC for CHAIN differs only sl iQhtly from
normal comPIIatiun.
The program name is not printed.
eno the diSc a~cress of the ASCII diSC *OUT=* file
(saved above) IS used instead of the diSC case address.
statement> executi~n changes the file refer~eo
to by a speclfieo fl Ie number. The first operand is
either a ~ or a f,'e designator ~ne the second is a
fi Ie number, whiCh is ev~luated. The return var'~ble
adoress is evaluated ano saved in ATM~+l (a dummy address is used If no variaole Is.specified).
If the current file buffer Is IIdirty". It is Vtrltten: !Ind if it is
a non-Shereable oevlce. it is releasee.
The count of
I 0 eke d f. I e siS c e cr em en. t ed i f the f i lei s I 0 eke d • The
fl Ie position IS marked not in use by cleari~g the first
woro Of the +1 Ie control clOck ana the protect maSK is
cleared.
The protect maSk (if present) IS evaluated c1!nd
the restriction (If present) is saved in Tt:.M~7. Control
is then transferreo to the ASSIGN library overlay.
execution consists of cal ,jng the SYSlibrary overl~y. The overl~y first evalu~tes the return vdrlacle aooress and notes whether Its type IS
execution involves conversion between
string and numeric data. The first operand is evaluated
to determine the direction of the conversion. If the
first operand is numeric It is converted into a- string
using the same-rules as In LIST. 1+ the first operand is a str.ing-it Is converted to a number.
I~an error occurs during the conversion. a Chec~ .S made for an
exit label. If One exists. execution conttnues there.
otherwise a +atal error occurs.
dnd executton conSistS of sett.ng ~SO=O for LOCK or -1 for UNLOCK ~nd then
call jng the LOCK/UNLOCK 'tbr~rY overlay a~ter evaluating
the fi Ie reference and saving i t in OkDNO. Tne overl~y
then evaluates the address 0+ the return variable - if
none is present a dUmmy address is usee. The variable
Alfv1P is set to 0 if e return variable- is present. A
check is maae to Insure that the fi I~ -.s not ASCII. At
thiS point the LOCK and UNLOCK statement executors
diverge.
The UNLOCK executor insures that the F.-Ie is lOCked. (by
checking the lOCK bit In the file control OIOCK) then
scans the loc~ Queue to re-SChedule the first user on
the Queue who is waitinq to LOCK this +ile.' The fi Ie
locked bit .n the FUSS taole entry for thiS Fi Ie 6s
cleared, LCKFL is eecremented (count 0+ lOCKed Fi les For
thiS user), ano the tocked bit in the fi Ie control block
is cleared. The active buffer pointer for t~e file is
bumped to the end of buffer _~nd the buffer contents are
written to aise If the buffer is dirty.
lhe LOCK executor CheCKS that the fi Ie is not alreadY
loCked by this USer (thru the FeB lock oit).
I~
it Is.
a fatal 'error exit is taken unless a return variable IS
specifiea. in ~hich case a one Is returned. The FuSS
table is scannee to see if any other user has LOCKed the
+1 Ie.
If the ft Ie is already locked ana a return variable was specified the valu~ one is returned (file
alread~ 10cKee/unlocKee).
If no return varidble was
specified. tbe USer .is put on a LOCK Queue and the diSC
address of the ti Ie is placed In the teletype table TEMP
wordS.
If the file is not currently lOCKed. a check is
mace to see 1+ thiS user currently has any other fi·'es
lOCKed (LCKFL=O).
If so. a return vari~b'e must be
present or a fatal error results.
The FUSS entry for
this fi Ie IS mcrKed lOCKed. as Is the FCB entry. The
count of lOCked +i les (LCKFL) Is incremented.
I~ the
user currently has 0 record In the buffer. it is written to diSC (if dirty). The recore is always·read anew
from the elsc·ane the active pOinter IS reset to the
beginning 0+ the record. Control IS then returned to
. the tn-core stetement executor through the scheduler.
The In-core executor reports fatal errors.
If ~Iso
takes care 0+ releaslnQ terminal output buffers for
prlntinQ and ~'aCing the user In output walt if he
tried to lOCK an alreedy lacked fi Ie.
The scheme of ~rittino dirty reords on LOCK or UNLCOK
anc al~ays re-reddlnQ the current recoro on a LOCK, insures the user that he always has the ~ytceol diSC record.
It IS alse Imoortant to note that a user Placed
on the lOCk Queue must not be swaoped out by the SCheduler before hiS st~tus is cha~c.ed to output wait otherWise the user wno has the fi Ie lOCKed may unlOCK
the fi Ie and reSChedUle the use by resetting the PACT
bit. However, if the status tsn't out~ut walt the user
wit I not be reSCheduleo (the PACT bit WI I I oe turned
off and tgnored).
statement> execution st~rts by setting erMP=-l
to flag the statement as a CREATE ana not d ~URGE whiCh
uses the same in-core executor hut WhiCh uses e djf~
ferent Ilcrary Overlay. The return varl~ole address Is
ev~luated and Sdved.
the +i Ie n~~e is evaluated. and the
fl Ie length IS ev~lu~ted.
The record size is evaluated
if present. The C~EAT~ library overlay IS called.after
first setting ~YSFL·to indicate a orogramm3tiC call.
execution sets BTMP=O to ~Iag the
statement as a ~URGE. The return variable address IS
eveluated and saved ~nd the file name .s evaluetea.
SYSFL Is set to indicate a proqrammatlc cal I and tne
stetement execution continues In the PU~G£ "brarY
overlay.
The user's library Is searched for the file name and
a cneCk made to insure tnat the file is a-data fife and
not a program file. The FUSS table .s cheCKed to determine whether the file ,Is in use and, If not. the file Is
deleted. Success or faiure Is Indicated Oy settino the
return variaole. See listing for addjtio~al detal's.
execution f·trst evaluates tne file
reference ~nd tne SKip count. A ~CK is made to Insure
that the file is not ASCII. Items tn the file are
SKipped until either the SKip count is satts~led or en
ena of file IS encountered. The return variable address
is evaluated ana the number of Items net sKiPDed (if EOF
was encountered) IS placed in the veriao'e.
statement> execution evaluates the file reference eno checks that tne ~i Ie .s not ~SCII~
Tne fi Ie
control blOCk IS cneCked for write C6Pdbii itv. Tne expression or strlnq is evaluated. The type, of the next
item in the f. Ie is CheCked.
If an EO~. an error exIt
is taken. It the fi Ie contains a numcer, the expression in the U~uAT£.statement must have evaluated to a
number.
If so, the number is placed In the fl Ie. If
the ~ile contelns a string the e~cresslon must have eValuateo to a str,ng. The strino .s transferred, and is
either truncatea or blank-padded te the same length as
the ort~indl fi Ie strinQ.
If an ucdate was successfully
performed, the dirty ~uffer bit Is set in the file
control blOCk.
. , ,
. and
dO not reQuire statement executors as they only contain
in~ormation whiCh
is reauired for comei latlon or during
the execution of other statements. The <~EM statement>.
of course. reculres no executor by oetlnition.
~----~~------~~--------~----Subrouttne Entry
POints and User VarIables
SPRQG=PBUFF->
------------------~---~-------~reviously - entered
~rogram Statements
pcPTR=SbUf."A->
-------------------------------
user Swap Area
( 10240
Current Statement
1#---------.. -------------_.._--buf
SYN1Q->
fer
(1 \J:l
WOr dS)
-----------~-~--~~--------~---
Syntax Stack
•
SSlAK->
--~~-~---------~~~-------~~--.
Avai
LwAlJS->
table user .Space
----~----~--~-----~-----------bA~IC and System
.•
17777
etLi. 0 t ec: ~
_
. . . - - . . . . . - - . ._ - _ . . _
. . _ -. . ,11 _ _ _ - - _ _ - - - - - - -
US~
Fixed,
PbUfF
Fixeo, first word of program space.
SP.J. -.------..---------------
SubroutIne Entry
points Ii. User
variables
PbUF~->
-------~~-~--~-~----I Common A~ea
-~-----------~~~-----
t::sASIC
Program
---------------------
<-SYMT~
I Symbol
:
Table
:---------~-----~~-Ava, I cO I e
,I
user
~pac:e
••
---~-~----~----------
LWAlJS->
BASlC and
SYstefT'
17777
---------------------
5-23
<-Pf::SPTR
---------------------.
: System Base Page
•
'
USE-> --------------------Subroutine Entry
: Points & User
Vartables
PbUfF-> -------------~------: Common Area
---~----------------bASIl,;
: Program
SPT~=SyMTt5->
Symbol
Table
--------------------: F I e Tab I e
i
-----------~--~-----Value
<-FILT~
<-"ALTt:;
T~ble
--------~~---------
Ava'. I Clb Ie
User Soace
---~----~-----~-~---~
LWALJS->
tsA~lC
and
System
77777
-~---~--------------
SPRQG - Variable, +trst word of orooram.
SY~TH variable, first word o~ sy~bol table.
S~T~ vari~ble. word Of program being processed.
FILTH - Variable. first word of file table.
5-24
~trst word o~ symbol value tacte
(FILTB
VALTb i'~'no Is in program)
Vartabble, first word available of user space.
P~PTR
SYMT~ and SPTR are not Changed after compilation.
FILlS ana VALl8 ere not changed a~ter al locating value storaoe.
VALTS -
~ar'able,
=
5-25
o -----~-------~-----~: System Base Page
U5E-> --~-----------------Subroutine Entry
pOints & user
var I Cib Ie s
PbUFF-> --~----------------: common Area
---~-~--------------SfJkOG-> : tiASl(';
: Program
SYMTB->
--~--~---------------
: Symbol Table
f"ILTfi-> -----~--------------: F I I e Tab I e
VALTc-> ------~-------------: Value Taole
IfSS-> ------~-------------: ~ormat StacK
-----------------~--~
I"
dASIC and
System
77777
5-26
IFSS
FCQRE
~TRNQ
RTNST
FQRQ
FORST
TMPST
OPTRQ
OPOST
PBPT~
'Jar lab Ie, first word ot: 'forma,t stack
Variable, first word not used by Phase I I .
variable, bottom of return staCk
ret ur n s t !3Ck )
Variable, top ot: return stack
Variable, bottom ot: t:or-stack (Sixth word preceding
for-s tack)
Variable, t~P ot: for-staCk (points to latest 6-word
entry)
Variable, top ot: temporary stack (points to latest
2-word entry)
Variable, bottom ot: operator staCk.
variable. top of operand staCk.
Variable, top 0+ operator steck.
FCORE. RTWNG. and
~OkY
are not Chanqed a+ter initiating
execut Ion.
Entries on the operator ana operand stdCk are one ~ord each and
interleave (i.e., alternate wordS belong to one stack). All
staCks beyond the return stack grow and Shrink as needed sO long
as user space is available.
~-27
~A~lC
Internal
~epresentatlon
statements are reoresented internally by the sequence
fol lowed by the len~th in words (incluaing the sequence
nU~b~r ana length woros)
fol lowed by the statement bOdy.
The
statement boay IS composed ~Imost entirely of operator-operand
pa~rs whjCh occuPy from one to three wordS each.
Nul I operandS
ana operators are usea when neceSs~ry to maintain the
oper~tor-operana correspondence.
The operator resides in bits
14-9 Ot a word; the OPerand uses bit l~. bits 8-0, and sometimes
whole eaaitlonal ~oras immeoi~tely following.
~A5IC
nU~ber
-------~-------~---------------o : Operator
u:
Nul I ooerand
~----------------------~----~--
--------~----------------------o
: 0 : op~rator : ~ame :
string variable
------~-------------------------------~-------~---------------: 0 : operator : Ncme : 1-3
Array Varlaole
------~--------~------~--------------------~----~-~--~---------
o : Operator: Name :
~-16(d):
Simple Vnrlable
------~---------------------------------------~~--------------: 0 : Operator : Name: 17 (b)
Function Varlaole
------~-------------~----------~
Hits 8-0 are oeneral Iy diVided into two fielos as fol lows:
.a n~me .Ield (oits b-4) ~no a type fielo (bits 3-U). The name
field ~oldS a value between 1 and ~~(~) corresPOnding to A-Z (for
functions, corresponainQ to FNA throuOh FNZ). A ~ype of 0
ident*fles a strln~ variable (e.g. 3,~ represents C$). Types 1
2 identify arr~y vcrlcbles of almensttonallty one ana two
respectively (e.q. 4,d. represents D[~.oUo] whj Ie type 3 identi ftes
an array ariable whose dimensionality cannot oe determined by its
immediat~·context.
Tyee 4 ioentj~ieS a simple variable with nO
d I Q I t ( e • 9 • I. 4 r e pr e Sen t sA) w'" .1 e t y pes :> - 1 6 (-d ) ide n t i f y ,
'simple varic!lbles whose n~mes inclUde the digit' 0-",(10)
respectively (e.g. b,7 reoresents F~J,.
Type 17(d) identities ~
proqrammer-definea tunctlon (e.g. ~~(~), 17(d) represents FNl).
Nane ~ielo values of 3~(~) thru ~C(b) correspono to extended
strinq re~resentations (e.q. A0i thru 21$).
5-28
--~~----------~---~-~------~: 1
____
:
operator:
4-16(~):
_______Name
.____ : ____
... __ .._
~4BZEIc:m~~_---
Parameter
~
~-~--~~-----~--~-~~-~------~---~
: 1 I o~erator : Name I 17(6)
Pre-defined Function
-~~--~------~~---~------~----~
~--~-~~---~-~-~--~~-----~-----. 3
: 1 : Operetor :
...---...E:tlnary
..----•
~-------~---.-
.
Integer
..--------
-~----------------~---~-----~---
Formel Dimenslonl
Hrench Address
l.ist
--------~~-~--~-----------------t2inary Integer
--~~---~-------~----~-~---~--~-~
--~--------~-~----------~------o
l I t operator :
Numerical Constant.
----~-~--~--~~-----------~------
High MantIssa
---~------~-~~~----~~--~-------~
: i::xponent
I LOw Mant
--------~---~--~-~-~~--------~-
-~----------~----~--~----------~
Oc::S5 (10)
: 0 I I (Ill
--~~-------------------------~--
String constant
-~---------------~~-----------~: Character
I Cheract er
---~-~-~--------~~----~-----~--
A
(whiCh can only appear inside a or (value in
fol lOwing word) or a branCh address list (one or more statement
sequence numbers In the ~o'lowinq wordS). A flaQged operand of
o tndicates that the tol lowinQ two wordS hold d floatinq-point
constant Cal I numerical constants within a pro~ram are so
represented). The operator with internal COde 1 Is fI, Which
siqnals the start of a strtnq constant. The operand portion Of
the wore h~S a .value .rom 0 to 2~5(lO), inolcating the number o~
p~r~meter
d'~fers
5-29
in the constant. The string fol lo~s. t~o characters
per word, ~nd the closing" is not expl icitly reoresented
intern~1 IY.
cn~racters
5-30
Th9
below gives the Interna'" representation of the BASIC
Those operators· whICh manipulate the formula
evaluation stack dur*ng execution hae associated priorities.
~ASIC statement types are represented in the fol lowing table.
They can be difterentjated from BASIC operators because statement
type~ must appear only as the first operator
in a statement. Atl
numbers are In octal notation.
t~ble
oper~tors.
OP
BASIC operator s
P~IORITY ASCII
OP
PRIORITY ASCII
0
0
1
2
3
0
.(end-of-formula)
••
•
::11
4
3~
4
33
.3
34
b
(unused)
and
OR
MIN
MAX
4
#
(F ILE)
3~
~
5
(unused)
(UnUSed)
(UnUSed)
30
5
<>
37
:.
>=
40
~
41
11
12
<=
NOT
b
7
10
11
12
13
14
15
16
11
1
1
13(1)
11
11
11
"2
)
)
(
4~
4:;
44
(
+
•
( sub s cr
40
IP
t)
47
= (assignment)
24
2
1
1
10
10
12
1\
o~
CJ5
5
>
2t-.
27
30
5
5
5
<
00-13
1'..
#
1~
20
21
2i:!
23
PR
45
(UNAkY)
(UNAI·fY)
~O-~7
00
+
01-02
b~
*
I
04-
= (eQua I )
76
1-'
5-31
••
(Dower)
USING
"
WR
NR
ERROR
(unused)
END
(UNUSED)
INPUT
REAO
PRINT
(UNUSE:.D)
OF
THEN
TO
STEP
8ASIC Stc1!tement Types
OP
ASCII
oP
ASCII
0-31
(unused)
SYSTEM
55
!:)b
CONVE~T
5·(
NE:.XT
GQSUB
Rt:.TURN
LOCK
UNLOCK
60
t:.ND
DATA
32
33
34
45
36
C~EATE:.
01
02
37
40
41
~UkGt:.
03
AOVANCE
UPDATE
04
05
60
b7
-, 0
4~
ASSIGN
43
44
L I~PUT
45
46
47
5u
5J.
C.o~;
11
LET
DIM
52
GOTO
7ii:!.
"I".j
74
7':J
70
'53
54
IF
77
FOR
IMAGE.
DE.F
RE.M
5-32
STOP
INPUT
Rt:.",L)
PklNT
Rt.STO~E
MAT
FILt.S
CHAIN
ENT£~
• I MJ-IL 1 t:.L> LET'
(unu sed)
(unused)
(unUsed)
(unused)
Pre-Oef*ned Function
Tabl~
OPerator - operand Pair Format
15 14
9
4
d
1
3
0
--~--~-----~-~------------------------~~-~-~. operator
17
I
I
I
COd~
III
...
-------~--------~- --~---
..
..------
-.~---.-----------
CODE
ASCII
COOl:.
ASCII
0
eTl
TAfi
LIN
20
21
GC
23
24
SIN
COS
BRK
ITM
REC
NUM
PQS
1
2
3
SPA
5
TAN
ATN
6
t.XP
7
LOG
2b
c7
10
11
12
13
14
1 S·
16
11
~BS
30
UOS'b
SQ~
31
::S2
SYS
4
INT
RNO
~GN
L.E.N
TYP
TIM
cS
3..:J
34-
CriRi
(unused)
ZER
36
CON
IDN
INV
;J7
TRN
3~
Extended String
~epresentation
9
15 14
4
d
3
o
--------------~---------------------------------Oper C!Jtor
Name
101
1 SUb-QPI
1
-----------~-----------------------~------------STRl~G VA~IAbLf
SlJt:S-OP
NAME
A$-Zj,
1-::t2
0
AO~-t-JO'i>
33
~O'6-Z0:b
;j4
0-17
0-11
Al$-P1$
3~
.jo
v-l"'
l.Il~-ll'b
5-34
U-11
Some examples of eASICstatements In their internal form are
given below. Note that actual function parameter formulas, formulds, and subscrIpt formulas app~arlng ,n· reQu~re end-of-formuta operators to signal their end
whereas mos t for.mu I as end e"I ther w. th the f I I" S t operator wh a·ch
does not manipulate the form~.la evaluation stac~ or with the end
of the statement. Note also that constants are ~onsldered signed
on.·y ~ith'n a . ASCII numbers are decimal,
Internal numbers' are octat in the presentation below.
10
.
L~T
WI
0
46
21
6
0
11
31
0
17
13
4
0
30
2
3
0
000004
1
0
22
12 11
0
16 12
0
20
11
4
4
0
10
24
1
OhOOOO
0
0
~
l*A(I,~+KJ
seQuence number
length
12
20
0
0
0
= Y = (b = C)
13
20 DIM
LET WI
=
=
=
A(~].
24
14
Y
0 41
1
1 12
B
C
~
0 11
1\
o· 2
3.0
1 12
2
..
A
4
(
I
4
•
+
.J
4
0
.1
1
3
0
3
2
3
b
·3
1 16
1"0
K
5,-35
11
0
C[c,,12]
30 Dt::F
0
1
0
1
0
~o
~O
13
10
17
20
FNC
36
10
3
30
(X)
=
X + AO
40
17
0
~l
4U
bO
lJATA
4
0
30
1
4
5
{J
0
GO TO
1
52
74
OF
A
10, 2lJ • ;30
·/4
24
.11
0
1 02
100UOU
OOOOUO
0 2
0
3b
0
7
1
4
J
l~
1
040~UC!
04140u
70
~AT
kl::.AD tit< :
A [
I1
lOb
0
0
0
11
f.7
0
f,4
0
3
13
1
0
0
0
Id
11
4
11
A~K
50
:>
62
0
REM
0
4
1
4
0
0
5-36
J
-.1,
IfAHC"
BASIC
V~riable
Stcrage
Allocation
PROGRAM FRAGMENT
~-"~-.-
.DEF(
FNC
- -+
x
~
C
.....
'.
x
VALUE TABLE FRAGMENT
~
A
0
-
"
____i.~
..
..;
,-
..-.~,
~
~
0601tJ00
",.
rtJ000iJ4
4
1
-
~ . . . . ~- --<.- . . - .- .,_. . . .
,
3
1
"
FNC
~~
......
,
A[2]
~
~
dimensions
1/
act ive
""'00.0 2
elements
... I
rzJ
)
....... ""'''''''''
A[3]
dimensionality
locally unknown
'l)
~)
-
[oJ
as
1----
.....
---_
...
~
.
",.
-.
8
.~
A
B
C
0
1'--
--~
-'--
E
~.-
~..
~
Inactive
element'
physical length/
109 i ca 1 I eng t h
)
t
,)
[I
5-37
dynamic
040ltJ00
00ItJ 00
dimensionality 1
A[ ]
dimensions
J
"0"'000
D3
A[1~]
declared
r\
100000
",.
A[ 1]
-
simple variable
r'I
>-
-S¥MBOL TABLE FRAGMEtJT
'"
value of
character
string
The symco,t .tab I e cO'ns I sts of two-word en·tr i es, one for each
unique symbol occurrln~ In the user's program. The first word of
an entry is the.lnterna' representation of the symbol as
previously descrlDeo. The second word of the entry is a pointer
to the value of the Symbol. For a programmer-defined'functlon
the value IS the defining formula in the . The
value of a SimPle vcrlable is a two-word floating point number.
The value pointer 0+ an array is its base adoress (t.e. the
adoress 0+ its first element); When an array is dynamical ty
redimensioned to OCCUPy less than its Physically al located
storeae, It occupies a contlquous block Justified to the 'ow core
portion of its element space. Since ~rray symbolS may not have
dimensionality locally defined (e.g. MAT A=8). array symbols may
have a "oon.t tIogical record end
--~-~----~~--~--------~--------~
:--
f i Ie
:-t·
t
neme
-----~------~~----~----~-~------~
(unUsed)
.
-----------------------------~-~•.
f tIe owner's
id
-------~------~---------------~-eof/eor exit
address
----------~----~-----~---~------~
sof:t error"' exit
(not Implt?mented)
5-39
FILl:. TAI-iLE ENTRY
(BASIC f i I es)
--------------------------------number of recordS in fl Ie
dlrtv record bit
dirty file bit
--------~-----------------------loqical record sizo
1-:
:-1-1
-------------------.. ---------._--(unuSed)
--------------------------~-----read ~ccess ------- :-:
write access ------ : -:-:
: -:
-----~------------------~----~---
disc address
of record
f i Ie buffer
:--
--:
base
:--
--I
disc
address
------------------~---~------~--word
I~st word + 1
of buffer
pointer
--------------------------------'lford
current buffer
pointer
oo.nter
----------------------------~---outout -bytes ,eft in reCQrd
input
=>Iogical record end
---~----------------~-----------f I Ie
nc'l!me
protect
mast<
-------------~----------~-------f I I e owner's
id
--------------------~-----------~
eof/eor ex.t
adoress
----~--------------~---~-----~---
soft err or ex i t
(not imclementeo)
--------------------------------5-40
--~f i I
e Is
locked
by this
user
The file table cons1sts of one eighteen word entry for each file
6r place-holder (It . . . ) In the FILES sta~ement. Bit 15 of the
first word dtstlngu'Shes BASIC flies from ASCII files. eit 15 of
the secOnd word is set when an Item 'Is stored .n the buffer, so
that only records which are Changed wi I I b~ written to the
appropriate device. ~It 14 is set when a record Is.wrltten to
the device and Is used during program termination as a bas's for
. ugdat I no the las t changed date word t n the .f- i Ie' s d' rectory.
entry. Bits 15 and 14 of word four are used to tndieate that the
user has read and/or write access to the fi Ie (if set). Bit 0 of
the same word is set if the file 's BASIC and the user has
executed a LOCK s t.stement. Bit .1 • s used to • nd I cate that the
last oper6t'on on an ASCII disc f"e was a write.
A 'og' ca ,. record-s' Zed buffer • s assoe I ated w t th eaCh f I I e tab I e
entry. and .s accessed throuQh pOinters in the entry. An
intra-buffer pointer deSlqnates the next portiOn of the record to
be wr~tten or reaa. A fixed pointer to the first. word .not In the
buffer acts as a bound on the Intrabuffer pOinter.
EILE_COblIEtiIS
There are 4 data types Po~sible in a BASIC fi Ie. A string has
bit 9=1 and tne length In characters In th~ lowest 7 bits of the
first wora, followed cy the string pa~ked ~ Characters ger word.
A two-word flOating pOint number has the ucper tHO bits of the
first word dIfferent, except for a zero. whiCh has both wordS
zero. An end-of-ft Ie Is 6 -.1, and an end-of-record is a -~, in
the ~Irst Vforo.
Data written to or read from a ~j Ie Is first exclusively ORed
with the fifteenth word of the file taole entry. This has no
effect, of course. unless that word is nonzero. It wi II be
nonzero only if an ASSIGN statement has oeen used to speCify the
fl Ie. ana the statement inclUded a orotect maSK garameter. Endof-file marks. end-of-recoro markS, floatinq poInt zero. and the
first word of strings are not maSked. The entire buffer. IS
maSKeo or unmaskea Vfhen written or read from the diSC.
ASCII files contain only str'lngs. ASCII diSC files are blOCked.
Eacn record conSists O~ a one word byte count followed by the
actual Character string. No carrtaQe return or I ine feed .s
appended to the string - these are conSidered to be the record
terminator' only for ~ser term.nals. Non-diSC ASCII fi les are not
blOCked. Each PhySical record eouals a 109ical record and the
lenqth of the record is deterMined to be t·ne lenqth of the
PhYSical record.
5-41
2000/COM~UTE~
SYST~M
bASIC
FO~MATTED
BloCk Size
FILES
logical size from 64 to 2~b words
default size is d5b wordS
Physical size Is alw~ys d~b ~ordS
Fi'e Buffers in core - one recore's length buffer per. file decl~ree
In progr~m
- written to disc When dlf.ferent bloCk
of t~at fl Ie reQuested by uSer
progrem
written to disc by nOrmal program
term i nat i ·on
buf~ers are ~wapped In dn~ out with
rest of user progr~m
seQuential
Access Moces
like Mag tape
automatically pass over recoro markS
until file mark encountered
reneom
logical blocks are aeoressable
within a block, sti I I sequentla'
~ecord ana F i Ie
Indicators - logical fi Ie mark (LEOF)
creetinQ ~ fi Ie ~Iaces a logical ~OF
mark as first wore in each block
~ritlnQ In that blOCk erases that
'oQical EOF marK
user proqrarn may write LEOF uSinQ
P~INT •••••• eNU (out continuing
to write seQuent'd"y from that
point wil I erdse It)
- Lt0F repl~ces L~OR that mlQht otherwise be written
logical record mark (LEOk)
auto~atical Iv written after last datum,
if blOCk not fut t. and if ~~INT ••••• ,
E"'D not used
phySical record mark (PtOk)
- oetlnes t~e absolute size a blOck; size
defined bv user creating the file
Physica, file mark (PEOF)
- the absolute end of the last blOCk of
c!' f I Ie
- IF ~NU.· •••• statement wi I I be executed in t~e
circumstances aescr~bed in the table
on following PSQe
5-42
--~-----------~~~---
SER IAL
----~---~-~-------~-
:--~------~--~-~I--------------\t4RITE
REAO
~-------------~:------~--~----~
---~--- _ _ _ - - _ _ I _ _ _ - - _ _ ~----~-
PEOF
---------------_..
PEOF
RANDOM
-~-~---~--------~-~-
PEOf.(
Pf:::.OF
LEOF
-_ .....- .. _---..--..---1·
PEaR
Lt:.OR
PE.OF
LEaF
-..----------~-.. ----------------1
'5-·43
Ell.~_lIt;.t:1
QEEl~lIla~~
eECOBC_t:JAB~S
=
=
=
=
-2
17777b(~)
logiCal record merk
loglcel record mark may elso be detected as the
end-of-record
-1
177777(6)
loglc~1 file
logiCal ftle mark may also be
mark of a ftle - i.e., the
fi Ie is pre-defined in the
~hysical
mark
detected as the last record
number of records In any
system
SIel~uS
o
:-~----------I-I-J----~~---------~---~---:
bit 15
First word
Format
10 '-i
000000
d
•• ••
string length
: il 0:
:---------~~-,-:-:-~---------------------:
~trinq
Ioant I f i er'
F- lag
In pOSitive Characters
1 <= length <= c~~
ASCII String characters are then packed into consecutive words.
two per Word9 lett Justified with byte wdsted If Odd length
string.
5-44
-
Identified by
-
standa~d
H~
de~ault
(I.e •• none Of tne above three)
2100 format
o
d 7
bit 15
I--I-----~--~-~~-~--~--~~-~-------~---I
word 1
I .:
I S.l
ion
I--:-~~-~---~---~-:--~--------~--~I
MSt1 Of ·~,.act
I
wora 2
LSd of
----~-- ~
:
fraction :
.. ....---..
ex~onent
...
• •
:S I
~---I "'~"---"---~-,-'-----I
sign o~
exponent
s j gn of fr ac t • on
5-45
upoate Lest Change Date Routine
Each file and program entry in the directory has a word
containing the hour 0+ the year when the entry was last changed.
It is necessary to upoate this word ~or fl les ~hen a program is
terminatee for any of the fol 10wlnQ reasons:
normal termination,
CHAINing to a new program, error termination, aoort and when a
SLEEP or HIBERNAT~ command is Issued.
The OFChk bit In the user's ?FLAG word in his TTY table Is set to
1 If there were any tIles statements in the program.
This
determines whether the LCD routine wl'l I be cal led~
When it IS.
each fl Ie table entry Is examined.
If bit 14 of wore ~
1, the
~i I~ has been wrItten on. so'the last Change date must oe
uPdated. This bit IS set by the ~RRlIF or OUTHF routjnes
dependlnq uPon whether the fi Ie is BASIC or ASCII respectively.
=
The only abnormal tty In cal I In9 L~D occurs fot lowing an abort.
The user is taKen oft the aueue ano re-jnserted with priority 0
to run a core resioent routine c~1 leo AHuCU WhiCh writes the user
to the s~ap tracK, cel,s LCD, and returns to the SCheduler to
finish aborting the u~er.
5-46
~ASIC
RTRNQ-->
Run-Time StacKS
------~~~~~---~--
The return stack Is
of f heed ;, erH~tn,
-----~-~--~~---~-
hol~lng from 0 to
20 one-word entries
: return aad~ess: }
~---~------~----- >
}
RS~ST-->
}
I )
---~----~-~---~-: >
~
words
at any time. An entry .~ the absolute
ad~r es s oft he
statement fol lowing
the GOSU8 which
placed the entry
on t .... e stack.
,5-47
For-Stack Entry
:pOinter to value:
IO~ ~or-varlable :
) two-word
I Imi t
)
)
)
value
) floating pt.
)
step
) numbers
)
)
size
)
----:--
-----------------Program
~raqf'Tlent
--~-------------
----~-------------
--->:
succeeoing
: statement
5-48
The -for-stack i s o~
varic'ble length.
containing one sixword entry for eaCh
for-looP which is
currently active.
Since the limit
value and stop Size
are kept In the entry, tney m~y not
be Cnanged wit~in
t~e for-loop.
The
value o~ the forvarleole is tne one
~ePt in the value
table, so this may
be altered by statements within the
for-loop.
--.........
........
~
1\
"
A
"
OPTRQ. -t
A
..
(unused)
e
OPOST....
B
,
B+C*O
start-offormula operator
------&0
start-of
formula oRerator
/
~
./
•
avaIlable user
space
LWAUS+
0
+
(unused)
.........
L
-
.....
.
TEMPORARY
,'c
PBPTR.....
STACK
ava i 1ab Ie user
space
LWAUS
(unused)
PBPTR. . .
C
Opu.., ,.
J
) TEMPORARY
STACK
. ~
( unused)
OPTRQ' .>
floating point
number
TMPST+'
Temporary
Stack
j
-
--
LET A = B+C '':0
,)-
OPOST.....
(unused)
)
'"
-- - ............-..
~----------------~
OPTRQ+
(unused)
+PBPTR
All operands (checked words) are addresses (i.e., C represents a pointer to
thp value of ~he ~imple variable C).
Bits 7 ~ ~ of an operator entry contain the
:':-'ors identifying code (See 'Basic Operators' Tab'f'e) while bits 15-8 contain
the op~rator's priority. Note the alternate-word structure'of the stacKs. The
temporary $tack holds intelmediate values during the formula evaluation.
5-49
~ASIC
Languaqe
P~ocesso~
Tables
The two areas o~ core label led SB~TB and USE~ contain the
mechanism aflowtng oif~e~ent users to exercise dtffe~ent portions
o~ the language processo~ without
jnte~fe~ence.
The lanQUage
processo~ makes
its SUb~outine cal Is to the labels in the.area
beginning with USEk. The wO~d following a SUb~outine ent~y point
is an indirect jump th~oU~h the app~opr'ate ~doress in the area
following SB~TB. when a user Is displaced by the system. his
reqlsters a~e saved at USER and the area of core from USER to
PBPTR.I inclusive IS aumped onto his track o~ the di~C.
ThUS, a
complete record of the lanquaQe erocesso~'s status with respect
to him is preserveo. The onlv thing particular to a user which
remains ~hen he is S~epped out is his own teletype table.
The tables heBded by ~UFTB (whICh must oe in case cage). SYNTb,
XECTH, ano FO~T are Jume tables. The methOd in the .ast three
cases is to compute a decision number, aad the base address of
the table. and transfer thrOugh the entry thus deSignated. The
ere-defined function iable Is used bv the formula evaluato~ to
ente~ the COde for evaluating pre-defned ~unctions.
The t~bles headed bv UUOTE and MC~OS nave seve~al uses. Their
entries are eXDlaln~d in the I Isttnq and their use wi I' oe
explained in those routines which access them. The Error ~umc
Table (at SEk~S) is explained alonq with the error routines.
5-50
5Y
NT A X
No
CLE'AH
"uP
Fa... New
P~oG-~AM
A..., Itt L.-V 1. ,.
S 'TA.,.EM e N j '
ADt>
>-"------1 51"""''E'M eNT
To
p~o &~A""
'])!;cRMIN ~
S li~Ue-NC E"
NVIW\'&\i"R
EMGe''D
E"Rft,OI\
\N
1> I\OG ~ Af'A..
No
'D ~ L.e''' e"
STI\,.S'M e'NT
REFe~~NCe'~
e-x,"
6" X.
l"'" )
'----
FLOWCHART
1
C OMPILAT,oN
Yes
ex
I'"
To
'':bONE
SAVE"
I
FtR\T'
STATe"""ENT
N ",H" -oE' Po. .
F tNt>
S"TIt\-'T
Af)t)RiSi of
PRo C'r~ A~
SCI C rLAG~:::.....--.... ! \,.
IN.
fFLA Go-
FLOWCHART
1 of 4
l..OtJ\PILAT'oN
COUNT'
NU"'6e~
S.Pt~C.H
OF
Fof&.,
RE"FEReN!c:O
~ or AT &:ME'NTS
S1""ATEM e:N-r
'BUIL-lt TI'&L.~
os: S",,"er\EtIT
WHEN ,ItNSl" IS
~NTffi.el)
1huc:r&.'1 ,1"
.... "'~~\."t ''''ITS
~If'''
M.ove
10
N I:X,.. ¥loft'S)
of
0
STATE"" e"N-r
FLOWCHART
2 of 4
REtLA(!'E'"
~",ewT'
r#:
. F.~rr .. P.~NCE'
wlTH
A~'D'le:sS
COM P I L. AT IoN
Mo"!" '
PAs'-
~--f FUNCTlON
'DE"P'N~-rl ON
~;"('ONt) Wot'S)
__----II:tN
S'1M~ 0 L.
... -,
TA~&''' EHTJ\ Y
J\'Ot)
>---t Fof\
It)
QueuE
FLOWCHART
3 of 4
CO,""
P t L ATIO N
PRNST cX11S
HEftE' oN
0.-
END
S"T'flltTfME'N
eRRoR. E:X I"f"
'fI'S
VL.Ft.G- . . 0
:;> eND
o f 'S~M~ oL.
FI~j'!
NEGATe
PO'N"!R 'To
Co .....
~Tt.Te M!'N-r
"T'Ae\.E'
ReTURN '-0
C.SAv f ~o"Ta ~ e
A1)VANtS'
Po I NT!l
?"cs."
1),t#\ENSlON S
VAI..TB
>-_....
~N:D
'*
01=
S"IMeOl..
"'AG~e"
FLOWCHART
4 of 4
]) Ec.o ~PI L..A~I
oN
REPLAC.E
SYM'OL iA6LI:
POINTE~ W,"H
VARI"&'! NA"'£'
PSPTR.
+-
POltn'fR To
""I) of
=P,-oGAAM
C LE'AR. C.FI...AGr
SVMT6 ~ 0
Sar-
( PR,o <-'-'Af'\
U W(OMP I~'J))
IN
!FLAw Wo~1)
Mo",,,
NexT WoA3)
or:
STATc~cNT
No
Move' P~O"~A'"
S ~(.\C. 0 ve.~
SPTR+- FILT&
't- Po ....TE,.
ftU> of
.,-0
Co"'~o.....
?RO&I:t.f\tI\
A'-SA
MoVE"
PAS'-
PRto.lS'-
f~ITI He~€
:b1fo\!N\IONS
___ • wMew
RiINTeItEJ>
1)1'-1c.1'L'I
'1f!!S
To
N.,cT Wo-.» of
Re"LA~S'
f'l\c-JfI
.-_
A~l)Re~, WITti
''''Iin'it\ENi
NuMt.."
~T'iMeN"
FLOWCHART
1
SET EXt/.
F=oR
E'N::D.
OF S'-AiE'ME' NT
':-IL..C..,... ~
C.o,,","N
+-
-S'
0
NoT'
'USn~'"
I='LftG
• L NUt!\ <4:sT"~E'Mewr-
:/:I:
NSP~" ~e.x-r
STAT!MENT'
bC.Mf>L
SA'/rE P~'N
J-N_o--,r0
'
-= R
FILE S
I
·riATEME'N-r
FLAG-
lusn~c;.'
~Tr:rt"r~ E HI
FLOWCHART
1 of 2
s\<\p
~E'$I
OF
ST"Te M E'N 'I
Move /0
NeXi WO~O OF
STATIiMeN"'"
5 PAC.e' 0,,£ P-.
~iRI t-J G-
CONSTAN-r
J="I.AG-
NoN-
VAtl,,, SL.E'
orE~p\ND
'iES.
SPAC.E
OVE~
FLOATING-'POlt-lT
FLOWCHART
2,0£ 2
COH!a'T1tN
1N ''rl AL.I'%. eo
S"tMeo\. ,.~~~C
P0 11'-4 ie I<.
A PPE .....D
>-.;;......11--_---1
New
eN"jt'Y To
S'l'MeOL. -r~s\.E'
R~ ~\"AC.E'
>-----'i.---_~
5 "I~ Go\..
,N
PP.OErf!AM WITH
ReLATIvE'
Pou",. 10
Nex'- S"''''~OI..
""l1\~Le:
E NTR,!
FLOWCHART
1
~nl~S
ASYM T
SeT R.eTUftN
AnOfleSS is
MATC.ti
~eT
F LI\G- FALS C'
P.' .. TE'tl
SAVe
"7'"0
eNT(l..Y
(~""C:'i Fl.AGr)
T·lvE
To.
MO\lE
No
POINT
l'lIoN IT
KNOW" iN1"'l'l
To New EtlTf."f
POUlT'
>---t ~".w If
":noN I
EHT1Y.
7D J)'Mi"''',
ONE
c. R.eATE
€NTQ.Y
Wsw
,..
O"'D
NuLL
A'boVt
~_~
ONe"
FLOWCHART
R ST PT
Po lI~lT To
r---~ f:4 e: ISo
oa::
tN." til"
~'1~(.\o1..
lASt.."
10
POINT
'SeGINNtN& 0 F
FL.A& 'STOC"••
P~OGftA~
.
NOT A~1.0~"Tfl)
"IES
E)tT~AC.,.
Ope"~Top.,
NE~""
fOINT "0
' 'ft.,. &" "" 1MT
W4tlD
0' 5.,,,,,0,"-
TAiL! f HTlt.y To
tHO...,""
t:NnY
C I..e:All
lu~l)
SEco .. D
ot=
TA'''c
r:w T-."1
''''Mao\.
EXTflAc:.,s..,~eoL. FROM
S"tM.a~L.
too\o,,(
TABLe
NtEx. ''YMSoL
TASLE
SET Po , ""T'eR.
Se'''
wo~~
oro
'l)
I tV
5..,"'601..
TA,&f..E
tM!""" IONS
NE'&AiS"
Sac:oNO
of
po INTel'
S'YM&OL. T/Il &1.E"
-I
To
~o",e
To
To
Move
P"'~T
NeXT S..,~&O'
IN
STATE't.\e t.lT
FLOWCHART
1
ENTJt Y
ALe 0
M
COMfo#.oN AL.~
~OI"'T
T. ~,jt.s"
STATe'~ E ,..,..
No
COMPUTE' s~
. R£ClII,(t.fb
F'o«.
VAst\A~L.E
MOV6
PP.o6AA
;0 M""! ~oo""
Fo-' CoM~O N
UPl>/t"'rf
AMOUtri
COMII\ON
0':
~-rotA
Mcwe 'To NExi
V~l'~ (!,I.E"
IN STATE'",e .. ,...
No
FLOWCHART
1
V A LU
E
VALUE
- _ _.1..-_ _....
T tot''TUU,I'%6
Co",~otot·
P.'HT" T.
fa.,n'EIl
F,~s""
S.,,,,eO\. TA8LI
t'\O\l;
"-0
~'""''t
J:Nt-nAL.l"Z.&"
E~Ro~
iRAP
I="L.AGS
NeXT S'1f'\60L
FLOWCHART
1 of 5
V A LUE
E'"
~
POlNTe1t.
"'0 CO~M.'"
A«.eJf\
upnATE Cot'lfo\ON
SeT
T.
POINTe",
VALUE
It-I
SY,-.aoL lA''''£'
St:,- V "LV e
,-.
U
N1)E F t N
e 1)
FLOWCHART
2 of 5
Po.IIITe,..
VA L U E
'S,,.
Sy~.o,
'TAG"'I' etitltY
. ~O\WT'A .,...
~O~"'. ~
S.:.,. s.,M, 6 ~L.
' ' E'
TA
eM""~
P.'H -rea. To
STIt,..NG-
<&AVE PH~"C.AL.
LetHrTH AND
l OGoIC.~1. l..N'1"..,
OF
-Z!~O
~Ave tpW'IS''''l
l.~N'TH AND
L;N"Tti
-ZE It 0
L04ilc.A\,
.e:
UPt>ATf!
C.Otl\fI'\ON
flOtN'TEI2.
FLOWCHART
3. of 5
V A LU E
>---~
"T~e" POINTt~
10 VALIJE TA!&.E'
I",
5.,,,,•.,..
~--~
"-"GLE
S E'T 1'0 INTEIl
To Afl..('lAY
IN
S"'~eol.
TAQ.L.E"
LoAD
Dec;",,,fl. eD
L.Ol'D ~'''''NS'O~~
l)IMEN$IO"~
O~
(IOJI)
RtOfl\ PtO& ~ A",
ott
('IOJIO)
IN,.,.,,, L,-z.e
Atfl.."y
f\IT p"'IS Ie A.l..
DIM.; ""~It. filS
INTO V "LV f:
'UNtI& F' .... ED I
Afl.6A
PUT l>vwAt-\ , (..
thtA.;N!.IQNS
cO
IN
VALUe" ""A~L.e-
FLOWCHART
4 of 5
VA L U E
'S E' 'r
,.
POIIIIT'Eft.
COfo\M.ON
Aa..EA
IN
Syt-\6o\.. -r-'SLIi
Sn
PHYS.C.AL.
AND '»"IH
"""c.
=
~:':"'--r---...., lhMIi ... S I ~NS
:DEC.U\A,EJ)
1).t'.
C.O~tUT8"
N"~t.e{l
at:
t-.~u.'f 'CLEMeN
,c:.o,",t\lTIl" 51'%.;"
'oF
1:> t! C: OM PH.€"
l)Sc.&.Afl.eD
Pt\ oertl Aft\
A Rr..ff,/
IN 1T,"L.,t. e-
At .. ",,, 1'0
Co M'unr oS ''Z.!"'
UPl)ATE
As S p~(.. F. eD 8y
C.o,",,,,oN
PO'~T'tt
)'1HA~\('
:.b,~eMs,o"S
No
FLO~lCHART
5 of 5
E)(ECU-rlON
A.
MAIN
Loa f
SET
C.LEAft CWA.N
FL.A'-
SIT
.s'Tf\C.~
Po I NTEtl.S
. c.Le/t&N
AND
uP
IN ITIAL.I·'Z.E
V"fl)~a L. e-.,S
"Se\\le:- C'-'AAEXT
5rtc'TEM eN-r
NUM&e"-
AlVMH.e'R.06l~f't
COIINTER. To
AL.LOC."T~
8UFFI!R..
Awe
N~ S''''l«e~~ NI
IN ITIItLI"LF
CONTlIlOl-
~L.ot.K
C"':'flE'HT
S'T,..,.fMeNT TYPE
ANa:. 600 TO
/It Ptf..OP" ,,.-rf
FINS)
MovE"
NeXT
To
".u"I',Me
1='11.1:
FLOWCHART
1 of 2
13.
. ~,,~ L.\.IATE'
ND
SI\ANC.'"
:l:NDEX
·Yes.
Lo~
"'-litHe. \of
A~t)ftE~S
No
~"~C.K
~G'"N~N
ADI)~e-S5
FLOWCHART
2 of 2
Abo
InENTIF),
eNTt:t'Y
Fop.- VARIAS~
Fa It
To
- .£T~C.K
PUT Fo~-VAft'A&l.
vAl.u-e
IN
Al)1)~E"s.s
eNTRY
SEr
For.- VA~I~IL=
'0
I U IT1AL VALU~
Mov,"
OLb
CHT~Y
,-.:.
A1)2)~fU
STAC.t..
Fo&.&.o,"",'" Go-
~r DF
cNTE'It
of
S T'ATE'ME'NT
'5A.."~
LI MI"r
V"'I.~E
E'NTP-'f
No
Sci"
'-Q
~~ANC.ti
Pftsr
"'soN£X'C.'h-rED
'''lie' ,..,S'Tef
SI"Z&
LoAl>
t•¢
e:NT~Y
'-----
~L.I MIN "T~
ADb
STefl
J=o,.. - S,. Pte.. ~
" l'tE"
"-0
Foll.- VIt"'IJ.L~
t:NTR.'(
Se'T
To
B~~wc.t-f
~"~~eN"i
]
No
To
Arnlt
, Fott. 1
t3e'NT, r-Y
~- VA"\~GL~
FLOWCHART
1
'I'll
SYSTEM
LI~RAPY
&-1
ROUTINES
T"9 AP~f~D routine ~s cal led bv ~ user to BPoend a I iDrary
OrOO,.,.,m to his currept orooram.
The operation is the same as
GFT for steps I-B. enc then continues as fol IONS:
9.
th~t tne proqr~m to be aoo~~oed
IS not semicomoi led
no com~on area. set the rl~te into word ~ of the
Mirectory entry an~ write it beck.
c~eck
~nd
h~s
10. Loeo user's current
oroqra~ and cel I OCM~L.
Chec~ that the
or"oaram to oe aopended wi I I fit. Bnd If so. "e~d it in at
the f)nd of· the current proqram.
If the redO liS unsuccessful.
f~
11.
i I •
If the current p,.OQrnm is not nul I. s~~rCh It for t"e
SPQuence numher ot the first st~tement of the ~Opended
or"oQram.
If OKay. up~ate PHPTR.
1 2 • 1ft h p.
cle~r
(IJ P pen 0 P. e
bel 0 n q s tot n e use,..
orotectlon bits In the ?NA~~
( r( 1 [) =
I"! ~ ~ 1£) )
the n
NO"~S.
13. If the ~p~p.noent.s In is not thp same as the user's ID or
?P~ID .then cut the ~opendent's
ID into ?~klD.
Also inclusive
or the protect bit In the user's TTY te~le (the third woro of
?~A~l. bit l~) if the r:30ceno.=jnt is crotected.
The ASSIGN Overl3y is used
ment in a user's prog"~m.
reol~ce
Inform~tion
In tne
ft Ip with information th~t
~s
Follows:
to O,.ocPss an ASSIGN stateThe functton of the ,.outlne is to
fi Ip control OIOCK O~ tne referenced
pertains to t"e ~~w file.
We p"oceed
ov HASIe
1.
Fino old .,
2.
v~t
~.
~rlte out cirectory pntry
reference ddte.
4•
V~ I I 0 ~ tea c c e sst 0 an ("j a I I 0 cat e f I I e .i
~
•
6.
leIS
Clrectory ent,.y
~nd
uoct~t~
In(lllte user '5 stat i c fltccess to tne new
VIIIJ tid ate use r • s Cy n ~ M j C
write out FUSS
t~ble
o~
~ Cc e
new fl
Ie
sst 0 the
f I I·e ..
with
uOd~ted
Idst
f
t v c e AS C I I •
f i
I e .( use F lJ sst a b Ie) •
with type of access
6-2
it, If necessery.
or~nte~.
-7.
F"ill
in ne-v inform.:,tlon into f:tle control ol~ck.
Adjust
pOinters I f f:i Ie buffer larqerlsmaller than that
in thts position.
~emory
A.
q~turn
to
t~e
'dngU~QP'
processor.
6~E
Tna RYE routine is used to loq ~ user off:. ThiS routine ~ay be
cel te~ by the user as a com~and from kis termln~1 or
pronr~metically. by uSino the SYSTEM statement.
dVE Is alSO
c~ll~d to 109 a user Of:f when thp. rop detects e disconnect on a
port.
1.
If there is no rOOm
lowest priority.
in lo~ table then reaueue the user at tne
Restart at LIBRA.
2.
If tne user
3.
Cleer output wait Dlt In the
4.
If: 10 Is zero. the user is not
c:;~
Clear
~.
If DFCHK=O then there ~re no files that require their last
d~te ucoated.
Go to~. otkerwise read In the user
oroor ~rn and ca I I LCI) to nO it.
?P~If)
hdd
an *nuT=* ft Ie then kit
fla~word
output.
I
~f
set.
loaaed on. then qO to 15.
nna 10.
Chang~
7.
Qefease non-sharablp deVices User has in use.
A.
~~move
9.
n9cre~ent
10.
Cle~r
thP. user from the
the numoar 0+
the user'S
~U~5
11. Put deto9 off entry
12. lIro,r.ate thE' ti''!'1e used
13.
10c~
~ctive
Queue
If
he is on it.
oort count.
tabl~.
,nto the toa table.
In tne user
~pna ~ 109 off
p ) e c t s the rn e
in
thP
lOT.
mess~~p. to the user via POSTR.
I~ the 10~
s s a q e ~ (l S T ~ wi' t S F) t the 0 u t put II a i t ·b i tin
t~e· user's
flag WOrd r=tnd t(=ll/P~Or£crE()/LOCKED/
F-ikIVATE
in olOCk of oroQ/fi Ie
diSC dc~ress if Mise tl Ie or oevice desl9nator
1+ non-sh~r~ahle nevlce.
inclu~~ for
.,Ies if its record length #2~b
I')Ev IA',,)O~
?
F ILF.IF ILE/FILE WITH vWAI
I-'~OG/P~nG
hv
thp system he~~ino conslstin9 of the
the t Imp..
~n;:L
6-8
svste~
Id, tne
Try to outout tne
go to 3.
and susoend.
ne~dina
If:
t~e
write
WI!S
r~ject~d
5.
Trv to o~tcut the directorY
rejected ap to ~.
~.
Set
7.
set the orevtous 'Nr i te .. taQ to successf:ul
found flaq to not founa (0).
~.
call
q.
(;et a bu ~ f:er fr'om LouT to blJ i I d a new --I i ne of: tne d t rect or y.
10.
wjth the 10 saved In
LTE~P
OLO(')t:<' to finrl thp. entry
entry f:ound ~ccordinaly.
If
ana susceno.
hp.~dinq
and LTEMP(1:3) to -is.
?~TIM
'(In LT£Mt=t 0:3)·.
prevtous write flag in~jc~tes the
successful then o~t th~ next entry.
t~e
~nS
the
entry.s
(0)
In
I~st
end, entry
set the
write
11.
~dve
I?.
t~
13.
set bit l~ of ?kTr~ If: th~ npw id COde is not tne same as
t~e
idcode of the orevious entry (now in LT~~P).
ne~
the' idcOde IS -1
Th.S forcEls'
lc:..
'~UI
1~.
out
17.
Trv to
tdCOdP.
then ter",lnate.
to be IncludAd in tna data line.
entry ndmA in the
t~e
?TE~P
0"
word~.
(he line eno susoe"o.
prevIous write ~Ift~ to fall
~utcut
tl"\9
~nve
to
~l.
(Psuedo entry)
set oreviOus write flag to
15
?O.
?~TI~.
Id the tine 0+ directory tnformatlon.
Include the
'deoca I f bit l~ of ?~TiM Is ~et.
Ins~rt the entry nBme.
The DrOQr~m cooe, tne protection COdP. the length, the
device/address end tne reco",~ fenqtn.
sP.t
1~.
the
idcod~
If the write f~1 lad.
and qO to stop 19.
(1)
succe~sful
(0) and
cle~,.
bit
?R T I ~" •
the
lT~~P
IdCOo~
(1:3)
GO to steo
into LTE~P from ?qTIM and move the entry
from the lTEMP wordS.
e.
6-9
Echo
tMe tp'etYOe. heve an tndeoendent
-The PI'" Inter ooeretes u~on data from the
co~~uter
only.
In orcer to ~e~e i t prir.t ~ typed Character, t~e
co~outer must echo baCK tne ch~r~cter.
when bit 12 of ~ port's
recei ve channel o'=!)rcmE'tpr is set (4?ClJ~' to 1). tn,e port is
oper~t;nq in ful I oUP'ex ~Ode and the multlolexer wi I I echo each
Ch~r~cter
it receives on ~ hit by btt basIS.
~n~~
devjc~S.
~ost
not~olv
l user wants to turn ~c~o on or, Off and
sen~s
to tne IO~ ~n ~Cn or ~n FCF.
The form~t of the command is:
COrr'l~.1I)nc
ECHr.-nf\1
F{.;t"1Cl-()FI-
ou~~
Thp
for tU I I ..1UO I PX
f...,r halt Quole)t
User
I) I J f\r' ~
rT1p."""rv.
cO"'I"!'I·~nd
co r.'I '!I (,~ n a cl I I 0 it S
IOfJ mr-rT'Iory. "'liT
IS:
~
lJ
~nri
S e ron A 0 I.i l)
sw~C'l
f)Ut·~t->-SYS
[.STIo4MTI~b
.,in kl ) ]
0u~~-la~
1.STA~Tl~G
wn~D]
f>tJ~ .... -S~~
[.~n,,",Tnl[.ST"'''''TTNG
f)Ut-rP-ADT
[.Ti-<~CKI:]
t 0 c. u ~ P Co,, ten t S 0 f
tr~CKS.
Th€"'
for:nat
of
s y s t em
the
"-n~nl
reSidPS If"l two 'Iibre:-ry ove"l~ys.
The first
the routln~ to ou~o thP system ~emory. the
routine to oUr."O tne s~~o tr~CKs. (lind uti Iity SUbroutine.
The
sec~nd ~verl~v. ~hiCh nvprlays th~ first o~rt of t~e f1rst.
co"t~ins
thP. routine to -turH:,. thP IriP .... f'~orv ~nci th~ ADTs.
Tne
ser:onn cv~rl~y uses some C'+ t ..... f:\ u t i l i t y sue·routlnes .n th~ first
ov("'r' ~y so i t mLIS t eno t.)f="for~ the usn rout I ne 0+ the + ir St
Tne r>tJMfJ routine
ov~rt~y
cont~ins
oVt3rl;l\y.
2.
1•
4.
~..
1 f t ne lJ s el'" i s not on 11IJ v U t hpn 4= d i I •
r,Mec .... if rIUM~ IS ~n..=trJ'I1C'l.
If not. ~al'.
, )e t (: r m j net .... H com F'Il-3 n d d psi r e C1 •
,Jut the startlnq word. oortr:. or troCK;.l If o"e was
~c·ec if i ed I n vI •. ":"ut U j'" V I
if. nr)t.
~rench to t ..... ~ a~pro~rldt~ routine. rcadin~ in the seconH
C'lvpr I·ey
if
necess~ry.
6-10
Thp cont~nts Of mem~ry ~re I tsted. Eaen I jne cons.sts o~ a five
dlolt oct~. ~ddresS foe lOwed by etQht SIX digit octal numbers
e~cn reQresentinq c
location in memory.
The user swap aree
c~~nnt he"
isted.
10
Pr I n t the rep 0 r the ad i no eon Sis tin q 0 ~ the s y s t em, d , the
nate end the time.
2.
print
3.
SYSTE~
PRUCESSOR MEMORY
...
Gpt the start in 9 ~ddr~ss (In Vi).
A.
J~ the adoress
j , beyond t~e sw~p area then set tne
t~rmindl
aodr~ss
(VA) to thp"end Ot ~emory clus
on~.
R.
GO to steo 4.
the address is in tne swac area then set the startlnq
addr~ss to th~ eno of tne swaP ar~a plus one.
Print
SWAP A~ entry Just processed w~s
the I~st one on thP. track)
then qO to steo to print the
buffer from LOUT to put thp outPut
d
i ~ no t nu
to tr-f' nc::nct
fine
vI
17.
into tne ouffpr.
pntry on the
ine qo to steo 11 to
1ft he I i np is nu I I
Plnri '10 to stet> 4.
then
bU1l0
tr~clo(
the print by
the traer< number, in Vl_ into \/4
set the Id~t seen disc arldresS, no~ OOlnted to bv V~
into V":J and ,,~
Put V4. V~ and v6 into ?TFMP to soecl+Y Nhere to restart
the list after the write.
Set LouT to move VI_ Vd and V3 into ?T£~P jf the write
f..,I Is.
This Will c~use the line to be r(~oui It on
return trom Ll"lllT.
c.
o.
·1 q.
in.
~ut
~.
•
I I •
~ disc ~ddr~ss
Set V5 to point to
Prep~rp.
A.
1 FoO
fi~th
~Ith
r.-all
wi II
('0
to output the line r:-nd suspenC".
tr,-,nsfer "fTt.M.P to v. V'2 ar'lct V3.
LOUT
()n
return LOUT
to step .,.
E~t.Cult.
The
~)t'E-.tl!T~
Thp
nocr~tion
1.
3.
~.
of
the
nE"'cooe nal"lp. ano
~ccess
2.
comm,'lfHl ell I ONS
thi~
tnp
cnmm~n~
S~VI3
if
user to
is
PFA
~s
Of"'t
~nC1
run
n
Oroora!Tl.
fol lows:
is reOu I r4?O for
the user to .
oroor~~.
Search the directory for thP entry.
If i t is not founo
or I nt NO SUCH J.-kO(;~~~ and ex i t .
If tnf:- entry is ~ f.i Ie then orlnt ENTI--'Y IS A FILE
~nd
pxit.
Chec~
the oroqram ~ntry to s~e iF the o~ner hdS ~FA.
If
not anrl itts reQuire~ ti-len print N0 SUCH E~T~Y dnd
exit.
(+ the proqram owner is the user t~p.n co t~ steo b.
Otherwise Chec~ if the crooram is orlvet~.
Print ~o SUCM ENT~Y
6-14
if. i t i, s.
Checw to see I t there is enouqh roo~ +or the ~rogram.' If
It is too bi~ print, PROGRA~ TOO LARGE and exit.
1.
I]Pdate the last re~e,..ence dat~ o~ the prog,..am's directory
e~try and .wrlte the directory track out to disc.
A.
~ead
In the user swap erea to PBUFF.
9.
Re~d tn the program from disc.
If th~ read fat's print
UN~8LF TO RETRIEVE FROM LIBRARY
and ex~t.
,10. Set the ~rotectton ~jts In the ?NA~f words~ Set bit 15 of
the first wore i f the proqram was locked. olt 15 'of the
second if private and bit 15 of the third .'f orotected.
11.'· Set the proqram owner wo,..o (?P~IO) in the user's TTY table.
set bit IS if the owner h~S rep ano Is a group libr~rlan.
12.
cal I SEMIC to initialize comol Ie variaoles before compl ling
(see the GET command for a more complete descriPtion).
13. Turn off the ~nterruot system and set the HELLO flag In the
use,..'s flB9 woro and Ch~nqe his status to RUN.
14. s~t the user UP to run ~or two secondS and set the tt~e flag
to tim~ this user.
l~.
~umo to t~e compl Ie routi~e.
6.
Thp FILE:: command serves two purposes. 'First. it is used to
aSSOCiate a file narne (C"nd crp.~te a dlrect~ entry)'wlth either
~ soeciflC or ~ class of "On-Sh~,..eab'e devices.
Second, it Is
userl to ellocate space on the disc (~nd create ~ directory ent,..y)
for a disc ASCII fi Ie.
1.
~~g.n buildin~ a directory entry by first extract,nq the
oroeosed name of t~p entry.
?
~~tt.n~
3.
~xtr~ct tne specifie~ devico deslon~tor dnd the proposed
r e cor d s j Z~ • S ~ lot 0' s t eo b for AS C I, I diS C f I I e s be for e
oettinq the thlra o~ramet~r.
4.
Search
the user'S ?CLOC word to -1 wi' I cause suspension of
the user if the Comm~"d was C~I led programmatically. Th;s
is aone to Keep us~rs whO are proqramm~tlcally USing the
fi Ie command from tylno uP t~e system.
device table ~or the device. Demano th~t the
is aval table on the sy~t~m ena that the user has the
capabi I ity to acc~ss it.
t~e
~evice
~e
Insert the new airectory entry in the orooer directory traCk
(cal I InQ SUDersave I f the tra~K is ful I) and UPdate the
nI"':Er:. IDEe. ana FauicMent tardes on oiSC. t::xit routine.
h.
For
~SCII
diSC
files. the next carameter is the
6-15
fi
Ie lenoth
(in blockS).
to 63 iF not
Extract it and
~nd val
pre~ent)
t~e
possi~le
i~ate
th~se
record size (set
parameters.
t~o
7.
Check th~t there is sufficient account scace and enOugh
system diSC space to accomooate the new fj Ie. Set disc
adoress to appropri~te spot on the oisC and insert new
directory entry. We don·t set read/write access oits yet
becduse we don.t ~~nt u$er to have access before file is
in it i ~ Ii zeo.
A.
UPdate tne dccount.s IDT entry
sc~ce frOM the AUT.
4.
lIsino thp. user space, fi I I ~OO blocKS worth of sP~ce with
FOF marks (user's h~ve ~een Known to plav triCKS to reBo loT
info from d bCloly Crp.atpd fi Ie).
lQ.
400 blOCkS in the f. Ie, suspend with rest~rt at
IZdtion overl~y (it I ives in the MWA overlay).
ot ... erwise. Qive th~ ~.ser read/write access ov re<9dinq
dlrnctory Odck Into ~rMorV 5nd then termin~te.
If
mor~
~isr.
th~n
initi~1
6-16
~nd
remove the neceSS.I!IIry
EILES
The FILES rout' ne i Sused by BASIC· at run t. me' t·o, !:'rocess' Pft.ES'stat~ments in a use~'s program.
Th~ ~unction of the FILES
routinp is to translate the fi Ie names in the user's progr~m
into fll~ control bloCKS for use durinq execution.
operetton of tne FILES routlne. a temoorary buffer is used
as ~ table to stor~ intermeolate data.
Nine words Of the buffer
are used for e~Ch fi Ie.
The ooeratlon Is as fol lows:
Durtn~
1.
Transl~te
Characters in F"ILES statements Into the buffer
stat~ments are oolnted to bY a four word teble
in the user swap area which is cointed to bY OFILT. FILeT =
-5+ # of FILES statements. Tharp. ~ay be UP to 4 such state~ents.
Fi lenames are extenden to six ~naracters. I~
necessary. and those whiCh are soecified to be sYstem library
are marked by setttno Hit 15 of their first word to 1. Those
w~iCh ~re specified to be group Ilbrdry +iles are marked by
settln~ bit 7 of
their first word to i .
A ....... alone as a
file namp is ~ place holder.
The buffp.r taole for the
p.ntry Is zeroed.
POSSible errors founa In thts step are:
t~ble.
~.
n.
2.
FILES
File nam~ of 0 or > 0 ch~racters
More than Ib files reauestod
Pprform directory search for ~aCh specitled ~ile. OIRWO
to the diSC ~ddress o~ thP. directory traCK in core
so t~at OLOQK ooesn't have to read ~nd ~rtte tne directory
~cr eeCh f l Ie.
~ave the fi le's diSC codress, ~i Ie lenQtn,
~na
'OQ'C~I
recora size in it~ po~tlon of the buffer t~ble.
The rearl-only b i t is set if the filp. is a I iorary file and
t~e user is not the owner.
An error occurs If the file Is
nonextstent or protected. UPdate the last reference date
woro in the directory entry for thiS file.
POI~ts
3.
V~I
ioate access to
4.
Test to m~Ke surp. th~t there Is sufficient room in the user
Area for tne file control blOCKS and bu~fers.
s.
V~I
~.
write out FUSS taele with type of access
7.
Rut Id fi Ip. control
Idate user's
dn~
OYnd~~C
al locate fl
acc~ss
olOCKS
I~
if type ASCII.
to the fi Ie (use FUSS teole).
qr~nted.
(see section on como; latton
format) •
6-17
~or
TMe GET command al lows
CO"'H~A""'O
user to Qet
d
croQram from tMe library.
~
F(JkMAT
GET-NAt.4E
r,fT-iiNAMf.
FULL ACCESS Tn USEP'S OWN ACCOUNT
SYST~M LI8RA~Y PROGPAM RtFERENC~O.
PRQG MUST
Sf lJNR OJ.l ~~o
Gk0U~ LI~PARY PROGRAM wEF~~ENC~U.
PROG MUST
GE T _r·JAt-ft. D. 10
~~~UIRtS
bE-.
1.
~eCOd~
~no
UtJ~
()P fJRn
nwN~p HAVE ~FA ANO uSER MUST HAVE
STATIC ACCFSS To nWN~R'S ACCOUNT
n~me
~no
in
ne~e
not~
LT~MP
If
proqr~m
~I
II
nF~n
~~A.
Le~ve
1D
0-1.
?.
'SPeir CM f or en try.
6.
If the entry aoes not nave
PkOGRAM ~no eXit.
~.
If the user owns oroaram aoto
~.
If
7.
If the oroQram
~.
Check if the oroar;.,,,, will fit ,nto the user ::tr~e.
ThiS IS
"~C~SSdry
In ces~ ~ oroar~m th~t was s~v~~ under ~n old
verSion of the Syst~m c~n no 10nQer fit With t~e current
v~rSlc,,'.
If it IS too hla orint PRI)(~~~M 100 LA~GE t=lnn Poxit.
9.
UPotl!!te thP. If.tst refprf'r"ICP nate of
wrltr. ~~CK to else.
10.
~cad
11 •.
Peed
12.
~ove
P~A
PR0(j~
in
SN~OOQC'c
~OC~~d
b~SP.
i f
no t
found.
but's reculreo print NO SUCH
~.
oroqram is crivdtp orlnt NO
is
AM
~UCM
~~06~~M
and eXit.
orlnt EXECUTE ONLY and exit.
th~
C'irectory entry C!lnd
pnQe.
in tne oroQr~~ ~eOlnnlnn nt the st~rtl~q dd~rp.ss
SPp.Clfied In t~e ~lrectorY entry.
If tne disc transfer
ft=ll Is then orint lINMMLF Tn J:.It:.TRIEVE F,.<;nM LIHI-(A~V t3nd eXit.
the
13.
t~e
Pr In t N() SUCH
tho
?NAM~
of t~~ OroorR~ from LTE~~+! to LTEMP+J Into
Norcs in the user's TTy tno.e entry.
n~me
set bit 15 of the first wore of ?~AM~ If t~e oro~ram is
tocken. the s~con~ wOrd If orivate ana tne tnlrd word
if orotecteo.
)4.
Put o~ner's 10. from LTEMP+O, Into
table.
15.
C~,
?PR~D
in the user's TTY
I SEMJC which.wl I I ~or unco~Di led prOQrams. c'e~r QFLAG.
res~t ~bPTR to the e~d of the new DrOgram. c'ea~
the compile bit in the user's TTY taole. set main and set
~PRO&.
For a compl 'ed ~r09ram ·SF.MIC will set PBPTR. and
FILTS to the ena o~ the ~rogr~m -6. SE~IC then moves the
~trst wo~d o~ the six a~ter P8PTR to SYMT8; the second,
the ~.Ie statement counte~. to FILCT; the next 4 words.
~ile statement pOlnters~
Into FLSTS+O to FLSTS+3. Then the
compi ~e bit In the use~'s TTY ta~le is set, ~AIN is set and
SV~T~.
SiJJ.111(d) except oel I 1(d».
~top when C~ encountered or after
I~ char~cter$ transferren.
4.
IncreMent
messc~e
I.
If so. tail.
counter ana set pointer to next meS56<;1e
I")uff~r.
5.
Terf'!":lnete.
*Th15 Is a Circul6r Queue maoe UP of five ~~ MO~d butfers.
variaole Incluae, MS~CT, a positive count of +ul I
buffers, MSQPJ. whicn contain the address ot tn~ next aV~1 lacle
butter. ana MSuPl, a pointer to tne butter beinq orOCAssed.
~elevant
6-26
The NAM~ command allows ~ user to ~ssign s name to his program.
The crogram name .s placed in his teletype table. Tne oceratlon
is ~s +01 lows.
1.
Get e cheracter.
"into e blank.
2.
If tn~ character Is not a blank. ,"etter or digit then zero
name area. whi Ie oreserving the protection bits, and take
the t Ilegel ~crmat ex'~ CILFER).
3.
Save tne character .n the NAME wordS 0+ the user's TTY
table, ana Keep protection bits.
4.
1+ less than b Characters go to step 1.
s.
1+ first word is bla~k then zero the ~ord except for the
protect'on olts that are set and get another Input
c~aracter.
If the next ch6racter isa carriage return then
exit. otherWIse output" the warning mess~ge "ONLY
6 CMARACTEH5 AC~~~r~D" be~ore exiting.
c~~aI~
I~
it is acerriage return tnan change It
command
The C~EA1~ command al locates SPdce on the dISC for a ~ASIC
formattea fi Ie. gives It ,d na~e. and creates ~ directory entry
to COlnt to it.
The space on the dISC jSlnitj~1 ,zed with EOF
marks to Keep clever users from being able to read any 'eft over
tables tnat previously occupied memory.
The overlay can be
inVOKed by elthor a system command or by en executing BASIC
prOQrn~.
In the 'dttbr case BASIC sets UP the parameters In ~
alrectory temelate (L1EMPO •• ll) anc sets SVSFL.
1.
I~ called proyr~mmatlc~1 Iy, continue at step a.
other.tse,
extract proposea fl Ie name, +1 Ie length. and record length
(opttonal psrdmeter). Save in directory temclate (LT~MPO ••
11).
2.
Set ?CLOC wore in TTY table to -1 so, i+ c~1 led programm~tlcal Iy. user WI I I oe suspendea at end 0+ routine.
This
~eeps users from
inordinately tyln~ u~ the system.
3.
If name is ouallfiea, cemano that 1) we were cal led
programmatically, 2) user .s a qrouD master, j) user nas
FC~ capabi I Ity, and ~)
potential owner io has PFA.
6-27
.........
~
MSQPI,-;
0\... .
'.
."
/
~.
!
,i
E" '" PT 't
"
'~
-.------,_.
EMPTY
4.
verity sufficient space exists In account and System.
disc address 0+ space to be removed from ~DT.
Set
5.
Insert new directory entry In the proper directory track
(ca I I i n9 s~per save i ~ necesscery). UPdate· owner' s· lOT antr y
and remove space from AOT.
Note that tnls order IS
important In the event of ettner being unable to Insert
dir~ctory entry or unable to update lOT entrv.
In these
cases, no space has been removed from the AOT vet.,
&.
Initial .ze f.le with EOF marks. If more tnan 40 recordS,
suspend user with restart a~ diSC file tnltidll~ation .(MWA
overlay reSident). When done, read bacK directory and
give user reaa/write access.
7.
Note that Ol~t::.c.., lDEe, and EQuipment Table are uPdl!lted on
the aisc as necessary.
u~e~SIt:tlCI
The UN~£STRICl commana al lows a user to unrestrict a program or
file. ~n unrestricted program allows any user having statiC
access to the ownerts account to bET, EX~ or CHAIN to It. An
unrestr icted file al" ows any user nav U"tq stat iC access to ,the
owner's account to read/-Nr,'te on It (SUbject to dynamic
restrtctioris). The uperation Is as follOWS.
1.
CheCk for legal name.
outPut an error message i~ not.
SearCh directory for program/fite. output an error message
if not found.
3.
Clear bIts 0:3 In the status word ana set bit 0, the
unrestrict b i t . in the directory entry.
4.
write the directory back out on disc and terminate.
~~OIECI
ThP. PROT~CT command allows a user to protect a program or ille.
A protected ~i Ie allows any user ~avinQ statiC access to t~e
~I'e to read it.
A ~rotected program al lows any user With static
access'to the ownerts account to ~XECUT~. CHAIN to or GET t~e
proorRm but not I'st. punCh or save tt. The operation of PROTECT
IS the Sdme as UNR~~TRICT but
6-29
3.
bits 0-3 In the status word and set oit 1. the protect bit, in the dtrectory entry.
C~ear
L.OCts
The LO~K command allows a user to loCk a fjfe ~r pr~gram. ~ny
user ~avi~g static access to the owner's f Ibrary may ExECUTE
or CHA IN to the- beg i nn l·nQ of the pr ogr am. A locked program fr om
the owner's program owner's account may CH~lN to other than the
beg*nntn~ Of the
locked program. A~Y user having static access
of t he owner's I i br dr y has r ead/wr I te capab 1,1 it y INh I f e execut i ng
a lOCked program from tne own.r's account. The operation of the
LOCK command is the S6me as the UN~EST~ICT except:
3.
Clear bits U-3 in the status word and set
bit. in the directory entry.
Olt
~.
the LOCK
The PRIVATE commano allows a user to place a fl Ie or program
in the private state. A fj Ie or prOQram In the pr,vate st~te
may not be accesec oy anyone but the owner. The operation of
~~IVAT~ is the same 0+ UNRlSTRICT except.
3.
Clear bits 0-3 of the STA1US
bit. in the air·ector.,. entry.
wor~
and set
Cit
3 the orivate
The SW~ command allows a user to Place d f i Ie in the SWA stete.
A file in the SWA state restricts write access to the file t~
at most one user.
The ooeratlon
IS
as +01 lows:
If not. output an
1.
bet ana checK for legal name specified.
error message one exit.
2.
Search the directory for the directory entr.,.~ output an.
error message if not found or If a arogram and exit.
3.
Clear MW~ bit in the entry If set.
out to diSC ano t~rmlnate.
6-30
write the diectory back
The MWA command allows a user to place a fire ih the
access. state. T~is permits simultaneous access,
to tne .i'e (su~ject to oynamlc restrictions) bY any users whO
hes static access to the owner's library. only users with the
MWA capabi.ity may execute the MwA command.
Tne operation i .
as foe lows:
multjp'e-~r~te
1.
Check and save the parameter I
output a message and exit.
ts~
of tne command.
If
bad
Cheek If tne user has MWA.
eXit.
3.
search dIrectory ~or the entry. output an error message If
not found. a program, or an asci I fi Ie; exit.
4.
Set MWA bit in entry,
~rite
I . not. output
a message and
2.
beck out to diSC and terminate.
fite ~ay be made M~~ programttcal Iy by the use of tne
statement to execute the MWA command.
A
SYSTEM
1 •.
Check and save the parameter' ist of tne command.
s~t return coce to fa"
and exit.
2.
Note if the fl Ie to oe MWAed has bean Qua'lfled
(tt lename.1D) or not.
3.
Check if the file owner has
fai I ana exit.
4.
search for the file.
I. the entrY turns out to be an ASCII
fl Ie or a pro~rcm tnen set tne return COde to fall and extt.
s.
Set the MWA bIt In the files
6.
If +1 lename was not Qual ,fied then gti to 7. otnerwlse cneCk
if file Is locKea. file owner has PFA, tne file owner is in
the group of the proqra~ running and the oroqram owner's Id
IS a group master.
print an error message and term~nate If
~ny 0+ tne Chec~s fat lec.
7.
wrIte out d.ectory traCk ana exit.
~WA.
6-31
If bad
If not. set return COde to
dlr~ctory
entry.
The p~use statement al lo~s ~n executing program to suspend for
period of time from 1 to 3c7b7 seconds. The user,s suspended
with the %~~U~ status unti I the time eXPires or tne console
~wakens him with tne ~wAK~ command.
~
1.
If user typeo in
2.
NeQc1!Ite the time specl'fled
3.
Cledr tne user's unacle to ~bort b.t so the user mav
unless the he had atSabled It (P~FLG=l).
4.
Set the user's st~tus to pause anc suspend with tne restart
aocress set to ~~u~S-I. When restartea after the time has
elaspeo or awakened by the console, the program enters. with
(b)=O Indicating success, the system statement clean UP
routine.
~AUSE
as a command tnen terminate.
by the user and put into 'lkTI",,£.
brea~
The function of ~~N~~bER is to aSSlq~ a new set of sequence
nUMbers to e user pro~r~m. The user may specify the sequence
num~p.r of the first statement and the increment between
stetement~.
If uns~ecif'ed. these ~re set to 10. He may also
s pe c i f y t he fir s t s tat me n t to be r en u moer e a and t ne I ~ s t
statement ,to be renumbered.
If unspeci + led tnase are set to the
f'irst statement ot, the program ana the last statement of the
proQram respectively.
There are actual Iy t~v sets Of numbers that must oe mOdified.
one set is the sequence numoers the~selves. eaCh of WhiCh
occupIes the first ~ord of its statement. The other is the set
of references, WhiCh are labels in CONV~kT, bO rOt bOSUH.
R£STOR~. P~INT USINb~ MAT ~RINl USING, ~nd I~ statements.
Each
of tn~se also OCCU~I~S one word. Fo~ programs In compt led mOd ••
they ~re pointers to the statement they reference; in decompi led
mode they ~re tne ~ctual statement number.
teChnique used Is· to Ch~nge· ~I I the references to
pointers ( i t in decom,pi led mOde). then to Change all the
seouence numbers, dna then (if in decomp. led mOde) to chanQe tne
references to the.new st~tement numbers. ~eferences to
nonexistent I~cels ar~ left unchenqed.
The.prlm~ry
~bsolute
8ecause the process ot changing al I the reierences to absolute
pOlnters ~an become quite time consuming (due to the se~rch that
must be performed for eaCh reference). a table is built In
advance alviatng the QrOQram into ~c parts. eacn conta'ining the
same number of s~atements. For large programs with many
references, this eitectivelv euts the time cown by a factor of
32.
The sUbr6u~i~e ~EN~K is usee to scan for references. It
me'ntains two polnters~ RENP and RENQ. Whenever It Is called,
i t moves REN~ to the next reference. and sets HENQ to point at
the statement fol lo~'nQ the one that ~EN~ Is pointing at. It
ta~es advantage of the fact that any references within a
statement are, alWdVS the last wore or wordS of t~e statement,
except In the case of ~RINT USING and MAT PWINT USING, in which
case It takes advantage of the iaet tnat there
only one
statement number reterenee. AI' PRINT and MAT PRINT statements
are scanned unti I either a U~ING is found or it Is determined
that no uSING IS in the statement. If a USINb IS found. a check
8S made tor tne statement reterence.
Before calling ~ENSK for
·the ftrst time. REN~ Is set to pOint at the first statement to be
renumhered. R£NP is set ~ENQ-l.
.S
Tne ooeratton of
~~NUMB~~
is
~s
fol lows:
1 • • IF nu" progrdm. terminate immediatelv.
user program.
otherwise, read In
2.
Perform statement length Check on al I statements in program.
3.
Trcnsl.ate and
values if not
4.
5.
cnec~
parameters M and N.
Set to default
~resent.
=
Transl~te parameters P and Q.
Set R£~tiA
First statement
to be.renumoeree, ~£NLA to last statement to be renumbered.
Set
kE~LA
~~NHA
to point to the I~st seQuence q ,RENLA.
to pOint to the first seeuence ~ ~ ~ENBA.
Also set
b.
Insure that tnere ~i I I be no seQuence number overl~p at
either end Ot the portion Of the program to be renumbered
ana that the new seQuence numoers wi I I not exceed 9~~9.
1.
If program IS In compi led mOde. 90 to Steo 10. otherwise,
set UP a table In ~~SeC whcih alvides the program Into 3~
parts. The result is that for each I ~ro~ 0 to 31:
6-33
E~S~C(l]
= seQuence number of first statement in pert I,
EkSEC(I+32l
= aosotute
address of thBt statement
If there are 3~K + L stc!tements (0 < L. S 31) in the program.
ERS£C [11 IS the seQuence number Of statement:
(K + 1)*1 + 1, If I < L
K*I + L + 1, If I~ L. K
undefined If 1 ~ L, K=O
Set
R~NQ=SPRO~,
kENP=k~NY-1.
points to the first
8.
~O
st~tement)
(SPROG
.•
Cal I kE~SK to find the next stc!tement reference.
If there
are none left. QO to step 10. Find the largest I for which
£HSt~ (ll ,
(k~N~).
If there is none. the statement
referenced coes not exist. so go to step~. otherwise. test
a"
statements from (ERSEC [1 + J2] to either (E~SEC (I +
33]) or PBPTR, cepending upon whether 1 < Jl or I
31. If
found. set (~tN~) to the locc!~'on of the statement referred
to. and repeat this steo. utherwise. gO to step ~ •. '
=
lUuuOu(o) anc go baCK to step 7.
set
10.
Ch~nge the seauence numbers for all
statements to De
changed. accoralng to the kENM. R£NN. kENtlA and ~ENLA
values.
If com~"ed mOde. terminate. otherwIse. set
S~~OG and ~~N~=ktNQ-).
11.
(kENP)
= (ktNP)
9.
+
RE~Q
cat' keNS~ to find the next statement reference.
If none
left. terminate.
If (~fNP) < 0, the reference was
unde~lned. so set (R£N~).
(kEN~)-lUU~OO(d). c!nd reoeat
this step.
=
a~eOBI
User console
The RE~OkT command allows c! user on AUUO to list user lOT
Information. ~c!Ch user 10 IS listed along with the time.
dtsc useo. its c~pebi It~ies. ~nd Its device oestQn~tors. The
routine LOUT ts usea tor I 'sting to the terminal. This routine
wll I suspend the user ~fter eech line.
6-34
=
The operation of the
1.
comm~nd
is as follows:
Check. If the user is on AOOO.
ana exit.
If not, print PRIVILEGED
CO~MAND
2~
Check if the user specified an 10 to start with.
If so • .
save it In the uSer's TTY table 1RTIM word otherwise save
a nu I I .
3.
Print.the f.irst·two lines of. the heading.
4.
Get the 10 coce +rom ?RTIM and searcn the 10 tracks for I t .
If the 10 coce is oreater than any on the svstem then
term*nate.
If the ID COde is not tnere. then Choose the
next one.
s.
~uj
6.
Check if the ID .s the last one on.the system.
If so. set
the return ~tom a successful wrlta to LEND otherwise set
to step 4.
7.
Try to outPut tne line.
If unsuccessful tnen go to~. If
successful exit to LLENO *f there are no more IDs. otherwise
bum~ the 10 in 1HTIM tnen gO to step 4.
10 the line in FIL~F. tor tne Iu consisting of the
iocode its time useQ, its diSC space used, tts c~pab"lties
ana its device eesiqnators.
The SAV~ routine is cal ted ~v the user to save a program
(uncomPI led from S~kOb to PBPTR) In library.
1.
Test for the existence of a program name ~nd a non-nul'
program. ~rint ~O P~OGRAM NAME or NO PkOGRAM if not and
e)C.it.
2.
~eae
3.
1+
~rogram
If
any •
. 4.
in user program from swac area.
is compj led then decomp, Ie it.
AI
locate common
write the program out to the swap area.
5.
Allocatee to CSAVE
for numbering compstlo' litv.
6.
co~pute
tne sPoce reqUired to save the program In negative
woreS and positive recorcs. Put the negative word lengtn
into the clrectory entry temPlate (at LT~M~ to LTEMP+ll)
leneth wore. Save the recora length +or the AOT searcn
6-35
See CSAVE.
.
later •
7.
Get user IUr·entry. ChecK the user cap~bi I tttes and set the
and FC~ bIts .In the directory entry template
acCordingly. Also the set private bit.
PFA
8.
If there is not enOuQh s~~ce left in tne ·user's
print LIBRARY S~ACE FuLL and exit.
~ccount
~.
Search the AUT for the space. In the process any AUTs
encountered that could not be reBa oecause of diSC errors
Bre oeleted trom tne system (length
0 ana the disc
eoarcss
0). 1+ the se~rch fa' Is print SYSTEM OVERLOAD
and exit.
then
=
=
10.
Save the ADT else address, the position on track of th.
entry, ana the SPace remaining after the program space has
been al locateo. Put diSC Bddress of the space into the
directory entry template eisC address word.
11.
Read the progrcm
12.
For
13.
write the program out" (from SPROG to PbPT~) to aisc.
If unsuccessfu,1 Oecause of. elsc error the go to steD
14.
Move
in from the swap cree.
only.
C~AVE
na~e
te~plate
b~Ck
~O.
f.rom 11y table (/NAME) to the directory entry
l:J). stripping protection bits if present.
(LT~MP
l~.
See CSAVE.
16.
Search for a cupl icate entry.
E.~Tk,( and eXit.
17
If the directory tr~c~ that the new entry Is to 00 on is
f.u I I· then Cc31 I lne SlJt-JEkSA\ta:. rout i ne to reo I 's'tr i bute the
n~rectory.
~v~~kSAVE will
perform step Id dnd proceed to
step l~. 1+ ~U~~~SAVE f~' Is then print SYST~M OVERLOAD and
eXit.
If touna. print
DuPLICAT~
lR ..... , II
In the stdrt of program pointer. the last reference
'date end the last Ch~nge date in the alrectory entry temDlate end insert Into ·the d'rectory.
the user's IDT entry ana
the diSC space usee.
19.
~eed
20.
I. tne ADl tracK lenqtn is zero or the AUT COUld not be
reaa from diSC then go to steD ~l. UPdate the AOT end write
It out again.
21.
1. the program
~as
UPd~te
successfully wrItten to tne
6-36
library tnen UPdate the system tables
on diSC.
22~
23.
(~QT.
'If the writer of t~e pr09rem to the us'er's
~~lled then. print UNSUCCESSFUL. TRY AGAIN.
Ul~~C.
IDEe)
I ibrary had
Termtnate.
sueEBsa~E
The &U~E~SAV£ routine Is called by the SAVE. CSAvE. COpy~ BESTOW,
F'ILE and CREATE routInes when they want to ma~e a dtrectory entry
on a track that IS already full.
SUPE~SAV~ assumes that the
fol lowing ~oros are set properly:
(LT~MP:LT£MP+3)
(Ll~~P+4)
track
= first
= pointer
4 woras of entry.
to DIReC entry for appropriate directory
(LTE~P+~)
= core address of entry WhiCh is to precede the
new entry
(LTEMP+b:LTEMP+7)
oisc address of entry
(LTEMP+8) = length of entry
(LT~M~+lO) = start of program potner/record size
=
Note that
ULOOK.
(LT~M~+4)
and
(LTEM~+5)
are set correctly by
attempts to redistr'but~ the directory trac~s so that
they wi I I be as eQual In lenqth as Possible. Tnis wi., generally
prevent it from being cal ted very ~reQuently. The operation
as follows:
SU~~RSAVE
'S
1.
Scan through OI~cC and determine tne total length of at I
cHrectory traCKS, and add It!. for the new entry.
If all
directory trdc~S ~re ~ul I. exit through fat lure location.
2.
Oiviae total alrectory length bv numcer of available disc
traCkS to determine tneir ne'w IndiVIdual lengthS.
Insert
these in the table at (OEFNN+l:OEFNN+dU) as negative.
3.
SQueeze ai' the directory entries to the last most of
the avai lable tracks. ThiS
done by reading the treckS In
reverse oraer ana writing dld4 wordS on eaCh traCk until we
run out of directory e~tries.
The +01 lowlnq variables are
used in this section:
NOW
SU~Kl
5UPL 1
'S
pOInts to the Olk~C entrY for trac~ being read
( i nit I c I I y tJ I REL)
~oints
to the Ul~~C entry for traCK being written
(Initially lJlkEL)
6-37
SuP~~
=
-#
of wordS
~n
core
4.
1+ (# 0+ ~ordS on trock SUPK1-SU~Kd) > dl~4, go to ~.
otherwise upoate SUPK2 end reed this trac~ to the core
buffer et locdtion LUL~N + ~~PK~ (S~PK~ being negative).
If SUPK2 • -bl&4, go to ti. otherwise set tne length into
the SUPLI Ulk~Ll ~ntry eno write the dlb4· word buffer to
track ~UPL1. Set SUPK2=O ~no gO to 7.
s.
SU~ES = (#Of words on tr~Ck SUPKl-SPUK2-dld4)/~5b.
Th~t
IS the numoer of extr~ blOCKS on tne tracK to be read.
set ~~P~X
~u~tS ~ c~b.
This is the numoer of extra wordS.
Then read tt"le lost ('It of woros on tracK ~0rJr<1-5UPl:.X) wordS
fr om track SutJt<.l to I oca t i on (LUL~I·~ + ~UPt< ~ .- " Of wor d s
on trac~ ~U~Kl + ~UPEX) and UPdate 5U~Kc.
~et
=
~.
write 81d4 woros to track SUPLl from location LULEN-dld4 ano
set t~e length in the SUPLl DIREC entry. Move tne leftover
-81~4-SU~Kc woras to tt"le end of tne bu+ter. resetting SU~K~.
lhen reaa the SU~EX wores left on track ~0P~1 to location
LUL~N+SUPK2-S~~~X.
Set SU~K~=SUP~~-~U~~x.
7•
UP 0 ate 5 UP L 1 t 0
8.
upoate SU~Kl to point to the next track to read.
If we've
finished al I traCKS. to to~. otherwise qo to 4.
·9.
It ~uPK2 = ~. 90 to l~. Ott"lerwlse write out the -SUPK2
WordS to tracK S~~Ll ana.set the lenqtn in tne SVPLl UIHEC·
entr y.
JJ 0
int
tot hen ext t r a c ~ tow r ~ t e •
10.
lero o~t the len~tt"ls in thp ~I~EC table o~ al I those trackS
tt"lBt no longer hQve anything written on them.
11.
redistribute the nirectory t~acKs.
The oastc toea of
the olgorltt"lm IS to +1 I I the swap area with as mucn o~ the
directory ~n~ormdtion as we can. readln~ from the beQinnlng.
and then to ~rite out es much es we can. ~.ways ma~tnQ sure
that when writln~ we don't overlay any portion tt"lat hasn't
been reao yet.
The ~ol lOWing v~riables are used:
NO~
pCints to the nlk~C en~ry for tracK bejng read
ni t j a I I y LJ! k t. CO)
SUf-'LJ. pOI·nts to the DI~EC entry ~or tracK oeing written
(Inatal'y Ulkt.CU)
~U~K~
# 0+ ~oros read so +ar from tracK SJPKl
(initially v)
S~~L~
# of woras written so ~ar on tracK SUPLI
(initially 0)
~~~
of wordS in core
S~~~1
( I
=
=
=•
(in~tially
SU~p
pOints to
U)
U~FNN
entrY. tel I ing how many are to be
6-38
wr*tt~n
=1
SU~T&
12.
on ~U~Ll.
if we have already Inserteo the new entry.
If SUPL2=-(SU~P). we have completely wrItten tracK SUPLl so
cheCk for SUPLl = DIREL.
If tt Is, ~e've _rltten al I the
tracks, so go to stec 1~. Otherwise, aovance SUPLl to the
next otrectory track advance SUPP. set SUPL2
O. end repeet
this step.
If SUPL2=(SUPP) 90 to step 13.
=
13.
14.
It -sup ~. lO~3~, '\tIe h~ve read ~s muCh as· we can. so gO to
step 15. If ::)uPKl
DIREU. there is nothing ·Ieft to read,
so gO to step 1~.
If SUPK~
Of wordS on trac~ 5UPK1,
we've re~d the entire track, so advance SU~Kl to the next
traCk, set SU~~2 = 0, and repeet this step. otherwise.
compute the number of wores we can read.
If there Is no
rOom to read the balance of the traCk, we will. otherwtse
we wj I I rea~ the maximum nU~ber of ful I blOCkS POssible •.
If thiS is zero .. go to step 15. If It .is not zero. read
from oloc~ SU~K~/~~b into core loc~tion LIBUS +SUP. Add the _
number of wOres read to SUP and to SUPK2.
=
=•
=
If SUPTG
O. determine if we can insert the new entry.
To
thiS we first determine where t~e even entry bOundary
occurs in the'core buffer since we may have read only part
0+ "an entry (l~ does not divide ~5b evenly). If the last
entry in the buffer is greater than the entry we 8re
inserting, the entry Qoes on this traCk.
If this
not
the case, go b~CK to step 13. otherwise, set SUPTG to 1,
maKe a l~-woro hOle, tnsert the new entry, set SUP
SUP +
12, end go baCK to step lJ.
d~
'5
=
l~.
~c~te_sectigO.
~et
wr ~ t ten.
l~.
= O.
ThiS is the number of wordS
number of woros we can w~'te on traCK SUPL1. First
number of words left to wr1te on the track. If
sU~L1 = SUPK1, we hdven't finiShing reaoing everything from
traCK SuPL1, so if SU~L~ - A > SUPK2 Change A to SUPLcSuPK~' whiCh is the number of wordS we can write without
destroying any unread dire.ctory tnformation.
If
SU~-SUPS<-A, we oon't ~ave as mUCh
in core as we are
cd~able of writing so set A = ((SU~-~UP) divide
2~6 ) x 2S6), an exact number of blOCkS.
Com~ute
set A
17.
SUP~
=-
=
If A
O. we can.t write anything. so if SUPS=O Slide the
remain SUP-Su~~ woros en core UP to locatlon'LI~US, set
SUPS
0 dn~ ~UP = Su~-SU~S. Then go bac~ to step 12.
=
If A#O. write -A wordS to block SU~L~ dlvjde ~~o of track
If 5UPLd
0, set the first 4 words 'of the SUPLl
Su~Ll.
=
6-39
nlR~C
entry to
SUPL~-A.
l~.
SUP~
~he
to
first 4 wOrdS written. Set SUPL2 to
~nd ~o bbCk to step lb.
SUPS-~.
set the new d'recto~y lengths into
cal I inQ program.
6-40
ulR~C
and gO
b~ck
to the
Tnis overlay prints errors embedded in the proqram after tne user
nas entered a program under taoe mode of after a LOAD. The
embedded errors ~re '3 word psuedO statements: statement number,
length (=3) and error number.
Tnis routine is cal lea in place of any command typed If the tape
error flag in the user.s flag word Is set. It is also celled
directly, if the error statement count (ERRCT) is non-zero. at
the end 0+ LOAD.
The ooeratton of th.s rOl.,lttne is as f=ollows:
1.
Read in'the user proqram from the disc.
2.
If on entry the error statement count (ERRCT) is zero then
qo to 13. Thas is the case if the user .aborted the printout of the errors.
3.
striP out embeaded error statements bY scanning the program
tor error statements and mo~tnQ eacn One found to the e~d of
the program as t~o word entries (the length wordS ere
deleted). Oec~em&nt the error statement count by one
-For eaCh one moved •.--.too the, scan When the count ret!'tches
zero.
4.
put into ?T~MP a pOinter to the -First two-word error entry
to print.
s.
write out to diSC the program ,and errors to uPdate the disc
Of the user's swap area.
COPy
o.
uet the statement number of the error.
7.
Read in the appropriate error message blOCk into the swap
area starting at LIBUS.
A.
Move the desirea error message to Llf4US and append "IN LINEn
ana the I ine number.
9.
the error messaqe. The reader should note that in
the print routine (LOuT) "the user has output wait status for
a brief perioa of time. ,Th6s al lows the user to break this,
an otherWise unbreakable routine.
10.
If the pr i nt fal I s (reject return from LouT), read t n the
program. qet the pointer to the error to print from ?TEMP
ano go to 6.
11.
kead In the program again.
~rint
6-41
12.
Bump the pOinter (in ?TEMP) to the next error entry to
print. If there are no more error entries then gO to 13.
otherwise go to 7.
13.
set m~'n; set the user's status to syntax; reset P~PTR to
the end of the program; clear the t~pe error flag ~nd exit·
to H£RRS+33.*
*RERRS+33 prints the mess~ge LAST INPUT IGNORED. RETYPE IT and
sets the user.s status to Idle.
Il~E
The TIMt command pr'nts the user's 10. port numoer. time useo
during the session. the total time used to date and the total
time permitted. The TIME command Is callable from a proqram
from a program via the SYSTEM statement.
The oper-ation Of
TIM~
Is as fol lows:
1.
Get user's 10 ana port number and compute time used in.the
current session from the TTY table. Put these values into
output buffer.
2.
He~d in the lOT to get total
time usea (excluding the
current seLsion) and the total time permi·ited.
3.
compute the total time used and put i t Into the output
buffer along with the total time permitted.
4.
Print it on the terminal or e~.t to SVSCU with the output
huffer If It was e programmatic cal I.
8bH~OU~Ct.
The ANNOUNCE Is useo ey the system operator to send a message to
a port or at I the ports.
The operatton of the command is as follows:
1.
Oeterm i ne if the mes sat;:le is to qO to one. por t ,or e I I por t s.
Fai I if the tlALL" was not typed or the port number IS
<0 or >31.
2.
Save the number of ports and the'+irst port to outPut the
message to.
6-42
3.
Put a Ck. ~F. LF into
~nother CR, LF, LF.
4.
~loCk
5.
Get the stetus of the report to outPut. If user Is to
run a type III program and execution had not yet begun
(?RSTR=LIBRA) then we must abort the program because
the buffer whiCh now contains t~e parameter 'I~t for the
program will be used to hold the message. ~Irst clear
the port.s sta~us. deaueue the por~ and clear the ~orts
OUT=P bit If set and then's'end "STOP" to the termina' to
ebort the executing of the command.
6.
If announce was to one port go to 7.
step 5 unti I all ports are cheCked.
7.
Send the message to the port(s).
8.
UnblOCk the clOCk.
9.
Check the status o~ t~e port(s) that had the message out~ut
to it. If a port.s status Is Inout wait then $end an Input
walt command (Iwl) to the lOP for that po~t.
FIL~F.
Appeno the message end
the ClOCk •
.
otherwise loop In
ASS1Gt:I Commano
The ASSIuN command allows the sYstem operator to esslgn a nonshareable device for exclusive eccess to al I users, one user, no
users. or to the R~~ ~actlity. Word 3 of the devlce's device
table entry contains thiS Information: -1. no USer; 0. al I users
(default); 1. ~~E only; . only that ldcode.
1.
£xtract SPecific device deslqnator.
2.
Sear~h
3.
Determine whether assignment Is to all. one user. none. or
deVice table for corresPonding entry.
R..JE.
4.
set word 3 of oevlce table entry.
5.
If assignment was to none. find if a user Is currently In
control. If so, set user's PACT bit and set status to
abor t (~AB~T). th is wi I I f.orce the user off the dev ice •
. 6-43
a~a~E
Comm~nd
The AWAKE command is responsible ~or waKing UP a suspended user
when the use~ h~s suspended ~or either an ATTENTION NEEDED
(device error condition 3) or beceuse o~ a programm~tlc execut.on
04 the ~AUSE command.
'5
1.
Determine whether comm~nd
AWAKE- or AWAKE.
If the latter, .continue at 4.
2.
Extract and val id~te port number; use port number to
construct ~ pointer to user's p~rt of TTV tabSe.
3.
(status
%PAUS) ana it's because of a
(sion o~ 1RTIM set) then set his PACT bit
whiCh will automatically wake him uP. Exit routine.
If user
PAuS~
Is
=
sus~ended
comm~nd
4.
Extract specific aevice deSignator and ~ind device in dev~ce
table. If the device Is buSy, the user· IS suspended With
?PAuS status, ~nd if this oevlce was the one that c~used
suspenSion, then we can awake him.
s.
If device IS not the mag tape we Change his status to
output wait (?O~Tw) ~nd send start timea retr~es (STR) to
the lOP. The IO~ wi II retry the device unti I it 's ready at
whiCh point it w.I. wake UP the user.
6.
If tne device is the m~g tape all we need to do is to set
hiS ~ACT bit. When he is re-sc~eduleo. he wi I.
~utomatic~1 Iy retry the operation.
The BANNER. commano accepts a message entered bY tne system
operator saves It on the disc In the I~st half o~ blOCk 0 on the
system diSC. The ~ormat o~ the message is ~ word with a byte
count fol lowed by th~t m~ny bytes of the message. If the message
Is null, the count word wil I be zero. ThiS message, If any, IS
displayed to users when they log on (see H~LLO comm~nd).
1.
.Read in blOCK 0 Of diSC O.
2.
Initialize pOinters to
3.
Extract messaoe from console.
with CR/LF.
u~e
byte fil ling routfnes.
6-44
If non-null,
termlnete it
4.
Set the count word to. the number cf bytes in the messaQe.
write out olOCK O. and terminate.
eESIQ~
Command
The BESTOW comm~nd tranSfers ownerShtD of librar~ entr .• ~s from
one 8ccount to. another.· optionally, we al low either all entrl ••
or a single entry. All entries may be transferr~d only when no
users are ,~gged on the system. only protected or unrestricted
en~r'es w~fCh dO .not ~upi Icate names in the target account are
betstowed. The methoa is to scan for ~n entry In the dlrectorv.
move it to the LTEMPS with a new account (adjUsting MWA, PFA, and
FCP bits i f necessary). a~lete the old entry, and Insert it where
it now belongs. A running count Of space deleted from source
acco~nt and ·space adaed to target account
is kept to UDdate the
lOT when the commend completes.
1.
Extract o'did, newid. and optional single entry.
2.
Qemand no users 10Qed on if entire library to be bestowed.
3.
Extract newidts capabilities, ~ccount space used.
account space al lowed and seve them away.
4.
Find entry ana determine feasibt I ity of moving it.
5.
save and delete Old entry.
6.
Insert entry for newid.
7.
LOOP back to step 4 untl I no
A.
UPdate Oldid ona newtd lOT entries for space used.
9.
output any notifications of thinQs not aone becuase of
protection, no space, duplicate names. or no entries
bestowed. Note t~at only one of these messages is output
t+ more than one condition .s met.
6BE8~
~ore
~nd
entries leFt in O.did.
Command
The BREAK command overrides a user's diSacled dREAK capability.
Tnp.re are two bits 0+ interest in tne ~Iag (?FLAG) word of the
user's TTY table: PbfLG and CBFL6. PBFL6 is set when a user
programmatically disables 8~EAK. The receive driver enables
a 6R£AK attempt i~ ~bFLG <> 1 or CBFLG <> O. ThUS, this Command
6-45
can set
PBFLC,.
t~FLG
BREA~
whjch wt I I al low
regardless of the state
o~
1.
Extract port number, validate It. and ensure user Is
logged on.
2.
set C8FLG (which wi II override P8FLG, if set), clear
(so crevlous ~~EAK attemcts w' II not cause trouble)
ana exit.
~bTRY
Ct:l8~GEIU
The CHANGEID command allows the system operator to mOdify the
parameters In an ID entry. The password, time al lowed. disc
scace al lowed and capabl I itles may be mOdified. The mOdiflcatoon
of the M~A. PFA and F'CP may reQuire 10's dtrectory entries to
also be modified.
1.
Get the 10 track the specified 10 shoula be on. If no other
parameters specified print ILLEGAL FORMAT and exit.
2.
Search the 10 traCK for the entry.
NO SUCH NO 10 ana exit.
3.
If a new passwora was specified then cleer the password area
in the 10 entry and'cut the new one in its place.
4.
MOdify the disc and time I'mit If specified.
s.
save the initia' states of
b.
Moaify the lOts capabt I Ity If any were specified.
7.
write out the
8.
If tne IC had MW~ but now doesn't or if t~e user's PFA or
capabll tty had changed. the lU's airectory entries
must be mOdlfiea, otherw,ise gO to step 10.
~Pdated
~WA,
It not found print
PFA, and FCP.
ID entry out to disc.
FC~
9.
Read I,n the IU'S directory entries and mOdifY the MWA. PFA
and FeB bjts'ln the status word approPriately.
10.
Terminate.
6-46
The Copy command allows the system operator to COpy a
program/file frOm one Id to another.
The operation of this command .s as follows.
I'.
Get an~ save Oldld and Qldname. Put the 10 and name tnto
LTEMP 0:3 ,and ~Iso tnto a temporary bUffer.
2.
searCh the directory for the oldname.
print NO SUCHl:.~TRY and exit.
3.
Move the old remaining part of the Old directory entry.
ne~ directory template.
4.
If the entry
larger th~n 200 blockS and there are users
logged on then prInt USERS LOGGED ON and exit. If the
entry Is LOCKEO or PRIVATE then crlnt ~RO~RIETARY ITEM NOT
COPIES and exit.
s.
'If the entry is a file and the file has neither the read
If It does not exist
The
.S
nor ~r'te capabi lity then print PRIOPIETARV ITEM NOT
COPIED. The f.'e was In the pocess of beIng created.
6.
Get the new 10 and new name and put into LTEMP 0-3.
7.
coPy the protection bits from the Old directory entry to the
name wordS of the directory template.
8.'
In the status ~ord of the directory entry temp.ate clear the
MwA bit if set it the new id does not have thiS capability.
set or clear the PFA and FCP bits according to the new ids
capab,' I j ties.
9.
Check if there is enOugh room in the newid1s account for the
new entry. If not print LIBRARY SPACE FULL and exit.
10.
If the entry to be copied is non-shareable device go to
step 12.
11.
Search the ADTs for space for the new entry. Print SYSTEM
OVERLOAD and exit i f space COUld not be found for it. Save
pOinter to ADT entry and put the disc address into the new
directory entry template.
12.
search the directory trackS for a dupl icate entry.
is one print uU~LICATE ENT~V and exit.
13.
COPy if necessary the entry into the sp~ce found in 40
blOCK chunks. ~ead the chunk first into the user area then
.6-4.7
If the,..e
write to the new space.
14.
Determine Where In the directory the new directory entry
Should go. Cal I SUPERSAVE 1+ necessary. SUPERS AVE wi' I
per form the next s tee and go to lb • .
15.
Set the last re+erence and last change date ~n the template.
Insert the entry Into tne directory, upaate the DIREC and
wr.te the directory track back to disc.
16.
If new space was not allocated
sn~reable
(entry copied was a nondevice) then go to lb.
17.
UPdate the space used In the new
tne ADT.·
18.
Upaate the system tables on disc ana terminate.
ideS
lOT entry and uPdate
The HIB£RNATE command Is Identical to the SLEEP command exceet
the following additions/changes:
for
o.
9.
or
set the current time Into HOATE.
Set A
-1 (hibernate) and jumc to the cume.
I oeaer ) •
=
QE~lCE
System Console
The DEVICl commend lists information of all
system. Tne d~vice oeslqnator. select COde
record size assignment (al I. a specific ID.
user (6n 10 and port Or tlR..JE" or blank) are
device"
T~e
(20000B of the
deVices on the
(tn octal). the
IIR..J£1t or "NONE"). and
printed for each
routine operates as follows:
1.·
Print first two lines of headtnQ.
2.
Get tne number of device tables entries. 'If none then
term i nate.
6-48
3.
Save pOinter
4.
Decode and put into the output buffer (T35~F) the device
designator, the aevice select code the maximum record
size, the assignment and the user (if the device is
busy).
5.
Print.
6.
8~mp
t~
the head of the device tab'e.
·the device table pointer.
If there are no entrtes left
then term t nate t otMarw i sa gO to 4 .•.
C18EClaa~
System consOle
The OIR~CTORY command I ist on the svstem tonsol~, bv 10,
directory tnformation. This information includes tne.IO, printed
only with the first entry of an account, the entry name,
the last reference oate. the 'engtn. the device/address and tne
record length. The user mav oPtionally specify a starting 10.
The operatton
o~
tMe command is as fol lows:
1.
Determine if a starting 10 had been specified.
It in 10 otherWise save 1 in 10.
If so, save
2.
Decrement the lU by one and save in
3.
print the first Meading line and suspend.
4.
Move the second headtng 'ine into
suspend.
5.
Retrieve the 10 save in T~~~F+~S put into LTEMP. Set
LTEMP(1:3) To 171777H~ Thts wi' I cause the "st to start
Bt the 10 specI+ied or the first one beyond if tne 10 does
not exist.
6.
Search the directory to fina the first entry beyond the One
Sought. save the 10 of thiS entrY In T3~dF+35.
7.
If the 10 is -1
8.
If the 10 code was different from the crevious (SOUght) 10
tnen InclUde the 10 In the line we are bui Iding.
9.
continue bui ldlng the I tne by adding tne entry name, the
tast reference oate. the 16ngth, the device/address ~na
the record length.
T~5BF+35.
T3~BF
and print and
(psuedO entry) then terminate.
.6-49
suspeno.
10.
~rent
11.
Retrieve the 10 COde from T35BF+35 and the n~me Of the entry
from right byte Of T35AF+4 to left byte of T3S+7.
12.
Put this into LTeMP(O:3).
13.
Goto 6.
ou~e
command (System Ooerator)
~na
This is the new entry sought.
The DUMP command entered by the system operator either enables
the use of AOOO's DUMP command or disaoles it. The routine sets
the wordS DUMP1 and OUMP2 (wnlCh reside currently In tne library
SUbroutines area) to the time It wi II be ~hen the DUMP capObl1 Ity
wi" expire. The ~OOO DUMP command demandS that the current time
be less than thiS value.
1.
2.
Extract, convert to binary, and valiaete that time
specified is between 0 and bO.
Add this time to the current time of day and save in
Exit the routine.
DUM~~.
ClSCO~~ECI
Command
The DISCONNECT commana logs off the specified users from the
system.
It is done by merely chenQln~ the user status to
disconnect (90DI5C); this effectively semu'lates the Situation
when a user h~S·phYSiCa"y disconnected from the system.
1.
Determine Whether command is DISCON~ECT-ALL or DISCONN£CT(port number). Set LTE~P+l to minus number Of ports to be
disconnectea ana LTEM~+J to point to tne first port.s TTY
table.
2.
LoopinQ on the counter (LTEMP+l). set eacn u'ser's stetus
to disconnect ana set the user's PACT bit to force the
scheduler to notice th~ disconnect.
6-50'
~lLLIQ
The KILLIO command "Is used to remove ID COdes from the system.
KILLID fIrst deletes the 10 from the 10 traCk. Then the
directory Is scaoned backwards to delete entrles belonging to the
10. A ~atch table is constructed at LIBUS + 8192 to aid the
return of space to the ADT. The patch table holds three word
entries: a two word diSC address and the length. The routine
RTAOT ~hiCh resides on disc "is called to Interogate the catch
table and return the space to the ACT.
The operatton of KILLID IS as f0110ws.
1.
If users are lOgged on the system then print USERS LOGGED
on and exit.
2.
If the 10 speclfled .s AOOO then print AOOO NOT ALLOWED end
exit.
3.
SearCh the lOT for the 10."
and extt.
4.
Delete the lOT entry from the 10 track and UPdate the"IOT
and its IDEC entry.
5.
Scan the directory backwards for an entry which belongs to
the 10 to be kl"ed.
.
6.
Put an entry in the patch table for the program or file.
7.
If not founa print NO SUCH 10
If the patCh table cannot hold'another entry then go to
9.
A.
Get the next entry on the directory track. If the next
oirectorv entry belongs to the 10 to be kit led then go to 6.
If the next entry does not then gO to 10.
~.
col lapse the airectory trac~. write It out, UPdate the OIREC
and return the s~ace In the patCh table to tne ADT.
10.
GO to the next directory traCk
11.
col lapse the directory traCk, write It out, UPdate the
DIR£C and return tne space In the patCh taole to the ADT.
12.
UPdate the
diSC
~nd
go to 5.
COPy of the DIREC. IDEe and EQT and
terminate.
6-51
The MLOCK command allows the system operator to remove diSC
bloCks from general usaoe either because they are bad or beceu~e
the-Instal 'at~on wishes to preserve some oloCkS for other
purposes (one use could be a disc with both Access and RTE or DOS
resident). MLOCK is one o~ those ~ew comm~ndS where any
additional documentation would be redundant. See I istlng for
any adaltfonal detai Is. Also see data structures ~or the ~ormat
of the locked olockS table.
~U~L.OC~
command
The ~UNLOCK commanc frees disc blocks lOCked by the MlOCK
commanc. See listing ~or additional detai Is.
~E~lO
The NEwID routine acas an entry to the lOT. lhe new lOT entry is
built in NEwBF be~ore insertinq into the lOT.
1.
Scen the parameter list for the 10
it Should go on.
2.
Get the passwora and put it into the 10 entry template.
3.
Get the disc space e I loweo and t I me a I lowed and ·Put - Into
template.
I~ d
L~ follows then QO to step ~.
4.
scan the parameter I ist for c~pabi I ities end device deSignators. Cel I the attribute search routine (SAT) to get the bit
position for eaCh parameter. Set these bits in the capabl'itv word o~ the template.
5.
Put the new 10 into the template.
6.
If the 10 tracK is ~u' I then cal I
the 10 traCkS. (,0 to step '7.
7.
search the 10 traCk for a dupl icate entry.
If not ~ound
then Insert the entry. UPdate the IOEc·~ntrv for the traCk
~nd wrete the trac~ back to disc.
8.
Terminate.
6-52
~nd
read in the 10
SUPER~~w
trac~
to redistribute
This Is a routine In theNEWID overlay that .s used to evenly
redistribute the Ius On the 10 trac~s. SU~ERNEW operates
,very simIlarly t.o SUPE.~SAVE except that it does not but Id a
tab'e to save ~he new length o~ eech track or Insert the new 10
entry into the lOT.
'
The routine first ca'culate~ the size ,each t~ack should be when
redistributed If t"e new 10 entry had alreadY b~en Inse~ted. 'A
fat. extt Is ta~en if there Is no room for the new entry. Next
t'ne IDS ar.e pac~ed Into the "ast most 10 trackS., Tnen the trecks.
starting with the .Irst one .s filled to the reQuired length.
The track the new entry I s to gO on Is fill eo 'IIi tn one less 'entry
and the first word of the track's IDEe is set to the new 10.
this Is so the FIoT routine wil I find this traCK. to Insert the
new 10. ~hen SUPEk~£~ returns to st.P 7 of NEWID.
et::iO~ES
Command
The PHONES command Informs the lOP of the number of secondS that
a user As allowed to have for log on attempts before we hang UP
the Phone. Tne IO~ starts this ttmln~ when a port Initially
brtngS UP data set ready. The time Is initially set to 120
secondS at lOP generation.
It can be set to 0 to effectively
prohtblt access to the system (tne'IOP ooes tnis by sett'ng ,a
nomtnal time of .2 secondS which Is too Short to al low anyone to
loa 01"\).
1.
'e:xtract. convert to .blnary. a.nd val idate
2.
Send tnis value to
eueG~
th~
t~e
time value.
lOP and exit the routine.
Command (System operator)
The PURG~ command aeletes ~ny programs, fi les, or non-sh~reab'e
device deSignators that nave not been referenced on or after tne
aate specified. The metnod is to SC~I"\ tne alrectory for
Qualified entries. aeleting them as theY are found.
As the
entries are found~ ~e bui Id a table of them immediately beYOnd
the directory track in memory. ~henever the tabl. fi I Is. we
temporar; Iy suspend processing the directory to ca. I in an
overlay whicn returns the space occupied by purged entries to the
lOT and the ADT.
6-53
~nd
val
id~te
1.
Iriterpret
the date oiven.
2.
Reject command It any ~I les ~re in use by scanning the TTY
t~bles ~or any OUT= ~i les and ~or any FUSS table entries.
3.
U~date
4.
Scan al I directory tracKs on system. deleting entries when
they Qualify. AOd entry to petch taole.
5.
When patch tabl e is ful I. remove space f,rom lOT and ADT.
6.
when last directory trc!ck 'has t:-.een scanned. rlemove'space
from lOT and AUT i. any entries In patch taole (see user's
PU~G~ comm~nd for a oescrlption of ~TluT and ~TAUT).
RTIOT/
RT~DT ~Ijl exit O~CK to the system if
last cal I.
the I~st re~erence date of the
so It does not ols~ppear.
~~eQ~1
H~LLO
progam
(.~
any)
System Console
The ~EPO~T commeno prints lOT .n.ormation on the system console.
For eaCh lOT entry, the user 10. the time useo. the disc space
used. Its c~P~bi Iities. and its device des.gnc!tors. Note that
the time used does not include time consumed of active users.
1.
If an 10 was speci~led get It and save it In REPLN.
not save 1 In k~~LN.
2.
Print the first headinq.1 ine
3.
Retrieve tMe lU In ~E~LN ~no ~ind the ID or the ~irst ID
passed It.
It the Iu Is beYOnd the last one on the system
then print the seCond I ina o~ the heeding dnd termtn~te.
otherwise set ~~~LN
-number of wordS from the 10 entry t~
the end o~ the tracK and set PEPpT to pOint to the -length
of the 10 trac~ In tMe IDEe table.
~nd
If
suspenc.
=
4.
Print the second I ine
5.
Determine from
entry resides.
6.
keaa in the IU entry and set REPID t·o point to it In memory.
7.
~uild
8.
Hump ~~PLN by 12.
If the result is zero (the entry just
processed ~as the I~st one on the ID traCK) go to Y.
otherwise print the line. Suspend and go to ~.
k£~LN
o~
ana
the report I ine in
the heading end suspend.
R~PPT
the olOCk on the disc the ID
TJ~HF.
6-54
9.
If there are no more 10 trackS then prant the line and
terminate.
10.
Reset R~PPT to po~nt to the ID track's-Iength and REPLN
to the -length of the ne~ track.
Pr.nt the 'ine. suspend
ana go to 5.
6-55
~ESEI
The RES~T command mOdi~ies the time used to a date
lOT entry. It operates as ~ol'ows:
=
~EST
o~
a 'user's
= O.
1.
set 10
2.
If tne I dcode
"ALL" QO to 3. otherw i se ,set 10 eQUa I to the
specified 10 cooe and read tne proper IDT trac~.
3.
If no time speCIfied, go to
spec I ed t i'me.
4.
lu
O. go to 5. otherwise search for tne speci~ied
idcode. Fail If not found.
If found. set its time ent,ry
to REST, write the lOT traCk back and ter~inate.
5.
Set the time entry ~or etl the idcodes on tnlS
R~ST end write It back to else.
6.
Move to the next lOT track. If al t are finished, terminate.
otherwise reao the lOT traCk and go to ~.
=
+.
I~
4.
otherwise set REST
e~ual
to
=
tr~ck
to
~CSIEe
The ~05TEk routine prints a I Istlnq of the idcodes ,of all ec~lve
users •. These are Obtained from the 110 woro In the 3~ TTY
TA~LeS.
The absence Of a user .s indicated by tne word being
zero.
t:hJE Commano
The R~E command extracts ~n k~E messaqe ·from th. conSole buf~~r
and notifies the IO~ that a message Is pending. At some later
point in time, the 10~ is supposed to send the system a wake R~E
UP (wRU) command.
lhis sets a ~laQ whiCh the SCheduler- interrogates and, If a message Is pending, wit I seno tne message to the
lOP. Tne RJE interconnect kit comm~nd serves t~o- purposes.
within thiS command it only noti~ies the ·IOP that a message is
pending; we do not bother to check for acceptance since we know
that It is always rejected the first time (thiS is' Incredibly bad
prOgramming end snoula be Changed,at the ~irst opportunity).
In
the SCheduler we actually cheCK for accePtance and. if accepted.
send the W~E message.
6-56
commana if
is stj"
pending.
1.
~eJect
2.
Extract message and·Qleee Into R~E command bu~~er (currently
resid.nt ~ol lowing the ~lbrar~ ov.rlay area).
3.
Save meSsage length In first word Of
4.
Nof6ty lOP that RJE command Is pending. we do not need to
ptCk UP .the reply code'since ~t wit t sit on the 'nterconneet k.t without harm. The STC. C done by the lOP serves
as our acknowleagement that the command w~s accepted.
prev~ous
mess~qe
bu~+er.
SLEEe
The SLEEP command is used for system Shutdown.
follows:
1.
Remove at t users
baCk by:
~rom
It operates
8S
the Queue and make sure they can.t
~et
a.
b.
c.
d.
Clearing eaCh user's 1FLAG word except for the DFCHK
bit. In hiS TTV table.
Setting at I status wordS to -2 (~OlS~).
Sending a KTu to all active terminals (110 =0).
Setting T3~LK to point to ~LINK+l.
2.
Kil I al I DUSY devices ana clear the flftn
deVice table entry.
3.
output the steep message to al I active users, preceeded and
fol lowed by a CkLF.
4.
Tel I the I/O processor were Qolnq oown bY sending a SSD.
s.
Cal I LCD to upoete the last ch~nQe date ~or fi les ~or eaCh
port that h~s its OFCHK bit stll I set. Clear the DFCHK bits
when done With each port.
b.
UPdate the lUT entry for eaCh active user and create a
logOff entry in LOGGR.
7.
Walt for
8.-
~ead·
9.
Set A = 0 (sleep) and jump to the dump
I ocoer ) •
~ord
o~
each
the console to finiSh outPutting.
in the loader. turn off all the IIO and the interrupt
system. set pov-er ~ai I to t"\att.
.6-57
(~00008
in the
The ST~TUS routine prints a summery of the vartous system
resources and the extent of their uti tlZation on the system
It operates as fol lows:
console.
1.
print thti heaaing consisting of system io, date and time and
suspend.
2.
print the logical unit, select cOde, unit number, first
bloCk and last .bloCk Of the discs on the system.
3.
Print a
4.
Print the disc aadresses ana tenoths of the lOT. AOT ana
Directory tracks.
5.
Print the disc addresses and lenqths Of the system se9ments.
b.
print the user
7.
Terminate.
I ist of those disc bloCkS
s~ap
whlC~
have been
track diSC addresses.
6-58
~LOCK£D.
PART III
I/O
PROCESSOR PROGRAM
HEWLETf-PACKARD 2000
S~SrEM
I/O
PHUC~SSUR
CONTENTS
I.
II.
I 1I •
IV.
V.
VI.
VII.
OVERVIEW
SYSTEM SERVICES AND DATA STRUCTURES
r~:
RMIN AI, S
NON-SHAR~AHL~
DEVICES
RJE
PROBLEM ISOLATION
lope
OVERVIEW
I.
Introduction
I/O procEssor s6ftvare in the HP2000 ACCESS sys~9m provides
concurrent and ostensibly
independent
functicns: "
The
si.ultan~ous supp~rt of up tc 32 time share users and a" Bemote Job
!nt~y ~JE) facility for access to batch systems in
IB! 360 and
370 computers.
This acc~ss'is gained through "a line printer and
card reader attached to the I/O Processor ClOP) of the HP2000
ACCESS system.
The TSB USEr also has access to the remote batch
system ,via a remote file transfer capability.
tvo
The RJE function utilizes the IBM multileavinq communications
protocol. This protocol was originally only available with IBM
opgrating systems including HASP but is nov also sUFPorted by
IBM's ASP, VS1-JES, VS2-JES2, and VS2-JES3. The protoccl provides
for
concurrent
operation
of
multiple data streams, both
transmitted and received, an~ includes data streaas specifically
us€:d for remote ope,rator control. This multiple stream cal=ability
vill be sp6cifically exploited in futu~e system enhancements.
The time-share functicn includes more comprehensive error
detection, automatic speed detect, and" terminal user access to
non-shareable devices atta~hed to the IOP (~.9. card readers and
line FI:intars).
1-1
II.
Design
o~erv1ew
~!§ign JSSU!B~12n!
Certain ale.ants of bardva~e required by this project are nev
to a 2000 series tiae sha~e systea. !icroproqraaming is used to
improve perfor.anc. througb .pecial purpose instructlons. 'fhe RJE
communications l/C support is based OD a 12618 synchronous
transmit/receive interface.
I
Y&riety of card readers, line
printers and paper tape punches aay be used as peripherals
available to both the TSB and B~! user.
~~~i~a!l
A§!!!EtioDS
The RJE function typically requires specific attention on the
part of an operator. He is tequired to activate and deactivate
the function as vell as to control its activities (operator
control and co •• ands; reader and
printer
operaticns,
and
communications line .anage.ent). Although it is not ~equired that
tha operator be knowledgeable of host systea (IBft 160 or 310) job
processing,
be
should be faailiar with reaote operational
procedures. This knowledge ca n cnly be acquired in cooperation
with IB! and personnel at the host site.
expected that this software will be
having a requirelent for both ti.e sharing
batch processing but haviDg no need for interaction
t~o.
Reaote file transfer capability Frovides the TSB
to the RJE function.
It
is
~nviron.ent
used in an
and reaote
bttween the
user access
Performance of the systea is designed around the assuaption
the TSB user and his reepcnse tiaes are more i.portant than
the, RJE function.
For this reason, the RJE function vill
generally receive lover priotity than !SB and aay show degraded
performance when TSB activity is beayy.
~hat
].uiSll
S!J1I mAU
The
structure
ot
the
I/O Processor software is an
interrelated collection of aedgles each pe'rforaing a Fredefined
task. Tvo groups cf .odules exist. O~e group consists of the IOC
(I/O Control) a04u1e and all I/O drivers. Based on the aevlettPackatd
Basic Control Syste. ,(BCS), this group of .odules
~ncompasses all I/O service, scheduling, and control.
The second
group of modules aakes u~ the' actual data 'processing systea.
These modules are divided into three general classea: supervisor,
manager, and function handler. The supervisor seetieD provides
run time control of which modules are executed; the manager
1-2
section provi de,s services utilizable by any other lDodule in the
system; and function handlers control, devices and/or
lDajor
processes in the system.
The supervisory task is carried out by th~ Dispatcher, which
controls the execution of furction handlers on a priority basis.
Function handlers are dispatched when an I/O operation,' initiated
by them, completes; or when eXFlicitly scheduled through the Queue
Manager.
This explicit scheduling of a ~andler is called
"priming."
All such eX::jcuticn centrol is perforlled by the
Dispatcher and control is always returned to the Dispatcher vh9n a
handler completes its processing.
.
Managers provide communication and support services for the
handlers. Interhandler cOMlunication is provided througb the
Qu~ue
Manager (Q~).
The Q~ is the central aessage switching
routine in th~ system; maintaining work queues, buff~r routing,
and priming cf handlers when work is queued. The Buffer !tanager
(aM) controls all buffer acquisition and relgase, and administers
all' buffer pools in the system. The Allocate/Deallocate Manager
(ADK) ~ntrols the use of nen-shareable resources by the toP.
Through its services a-not-shareab16 resource, such as the l1n9
printer, may be assigned to a -particular task, such as RJE.
In
addition to these managers, several general purpose data handling
routines and common subroutines are included.
Punction handlers contrel device's or ma jor pro-cesses in the
systeme Associated with each handler is a qU3ue or queues. These
queues are the source of wotk for the device or process which the
handler controls. Handlers ty~ically initiate I/O operations to
devices (through the use of queued IOC) and perform necessary
processing when the operation completes.
Other handlers never
perform I/O. Instead they ~erform major processing functions and
are driven strictly by Dispatcher priming. Through the services
of tha Q", handle~s inform (ne another of work to be performed by
making entries on work queues.
The handlers also acquire and
release buffers and the use of non-shareable resou~ces where
appropriats. The term "handler" or "function handler" should not
be confused with "driver" at the aCS IOC level. The function
handlers in current use are:
1.
2.
3.
4.
5.
6.
7.
Interconnect Kit Handler
Multiplexor Handler
ASCII File H~ndler
Time Base Generatcr Handl~r
Line Printer Handler
Card Reader Handler
Synchro nous Communications Handler
8.
9.
10.
11.
12.
13.
14.
15.
Console I/O HandlE~
Host Inguire Coapxession Handler
Host !essage Decol~reasion Handler
Host Reader co.pression Handler
Host List Dece.pression Handler
Paper Tape Punch Handler
Photo-reader Bandler
Reader/punch/lntexpxeter Handler
Ti.e-ll!a.,
l.Y.ll£.t~
The tiae-share fUDcticn cf the I/O processor is graphically
illustrated in figure 1. Tvc distinct types of data flow are
implicit in this function: the terainal user/systea dialogue and
comaunications with lSCII file
devices.'
Seyera.l
handlers
participate, so.. on a shared basis, in these co •• unications:
specifically, the interconnect kit,
the
ASCII
file,
the
multiplexor, the card reader, the paper tape punch, the photoreader, the reader/punch/interpreter, and line printer handlers.
The user/syste. dialogue is conducted exclusively tbrough the
interconnect kit, serving as an interface with the
systea
processor, and the aultiplexor, functioning as the'ter.inal/user
interface. llthough each hatdler is seryed by a single guene, the
connection does provide the capability for 32 concurrent and
independent data strea.s (one for each tar.ina1 user).
Meither
handler is allocatable by the lllocate/Deallocate !anager since
they are peraanently associated with each other.
Operations on
any, data strea. are controlled by the interconnect kit handler at
the dictate of the systea prccessor. This control is esercised by
4:he dispensation of buffer. by the inte'rconnect It'it for r.ading,
writing, and centrol operations.
The only exception to this
structure is the ability of the aultiplexor handler to request
sp~cial processing for unusual conditions,
i.e., line break, or
break character received.
ASCII file co •• unicatioDs are carried on betw.en tbe system
processor via the l~CII file handler, and an external I/Od.vice
via the handler de~icated to its operation.
!be ASCII file
handler is served by a single werk qneue supporting aultiple data
strea.ms as in the case of the interconnect kit handler. Such is
not the case, however, for the external deyice bandlers which are
single queue, single data streaa ~rocesses.
The intormation
1-4
DATA FLOW OF TIME ·SHARE
INTER-.
COWNECT
KIT
. HANDLER
FUNCTI~
CARD
REl\DER
HANDLER
1:1
Q/
~
\
. ASCII
FILE
HANDLER
r-I
riI
p::;
::>
C>
~\
H
~
\tl&J\
.J\
~
~
reo
.~.
MULTIPLEXOR
HANDLER.
. f
LINE
PRINTER
HANDLER
necessary for data stream identification is solely a function of
the ASCII file handler and need not concern the external handlers.
The connections between handlers performing Ase!'I file
operations
are not permanent, since tte devices themselves, the card reader
and line printer, are also required by the RJE function.
While
the connections are established~ hovevar, control is vested in the
ASCII file handler as it is in the interconnect kit for ter.inal
traffic.
That is, control is exercised by dispensing tuffers for
reading,' writing, and control o~erations.
The following message flow is possible among handlers for the
time-share function:
!l! - ~ransmitE buffers to the aultiplexor for read,
and control operations.
Receives buffers from thg
multiplexor for write and control operations and empty
buffers for discretionary use~
lni!I~Qnn§£l
vrit~,
- transmits empty buffers to the interconnect kit for
its discretionary use atd also sends buff~rs for write or
control operations.
Receives buffers from the interconnect
kit to bg used as directed; read, vrite, or control. .
~~!1iRl!!2!
A~~II
iil£!
transmits tUffers to the card reader and line
printer to be used as directed; read, write, cr centrol.
Receives buffers from these handlers for transmittal to the
SP (write or control) Ot for discretionary use •.
£ll.9
~~!1t" - transmits card images to the ASCII file han'dler and
receives buffers from the ASCII file handler to be used as
direct~d (read cr contrel).
~~n!
~~!~i!£
- transmits empty buffers to th~ ASCII file handler
for its discretionary use and rec~ives buffers from the ASCII
file handler to be used as direct:d (write cr contrel).
1-5
Figure 2 illustrates .the RJE function components. sc.~ of
thas'e cOIIPonents represent Ilcn-shareable, allocatable resourc'as
for
lihich' the RJE function 'competes along with'1'S8 users. Some
software modules depicted in figure 2, therefore,' are the same
ones shown in figure 1. 'rhree gene ral le vel s of soft ware exist.
Central to the design is the synchronous communications handler.
Here are isolated (as much as possible) details of line protocol
and control. All line I/O occurs at this level. This module is
also adaptable to the configuration of the remaining tvo levels.
At system initialization time, it determines that configuration
and, subsequently deals with it. Thus, for exaaple, the Duaber of
input data streams need net be kncwn to this level in advance.
At the second level are all modules which interface' directly
with the level one communications module. Some are input related
modules which acquire and ire~~ocess data to be transmitted. In
the case of aultileavinq, preprocessing involves blocking and
co.pression of data.
Other modules are output related. They
accept blocks of data fro. the synchronous com.unications aodule
and
prepare
it for out~ut.
Kith multileav!ng ttis .eans
deblocking and decompressing.' At s,ystem initialization time, the
synchronous communications handler at level one deter.iDes how
many input and outpu't module s exist at 1e vel two. At run time it
then provides instructions to these modules about current runninq
conditions.
Level three modules are ccncerned with actual I/O operations.
These modules may represent allocatable resources (e.q., a line
printer)
which
a
leval
tvo .odul~ must acquire.
These
acquisitions are typically iritiated by operator commands or other
signals from the communications line. Once the acquisition is
complete, the associated lavel two module 9ither provides data to
or accepts data from the level three module. These se-called
lev91 thr~e modules are not unigue to the RJE function. They are
in fact the same modules which will be used by the ASCII files
handler. In the case of remcte file transfer, the level three
module role is played by the.ASCII f~les handler.
Consola
communications
require special attention.
Th~
console (ASR-35) is attach~d to the system processor, not to th9
IIO
processor.
For this reason, minor change,s to the system
processor have been design~d to allow transfer of aessagEs to and
from the I/O processor. These messages either originate from' or
arrive at a level three module concern9d ~ith console I/O. Due to
the often unique nature of ccnsole me~sages, required intEraction
b~t.,een this module and any ether module i·n
possible.
the
systell
is
made
~j2~ ~2~l! jelat~onsh1R!
Seven level three mo~ules viII be used. The line printer
handler will bE the same module used by the ASCII file handler.
It does rapresent an allocatable resource and will therefore haye
no ~~I!anent connection to the level tvo module (host list
decompression) with which it ccmaunicates during the RJE function.
A card reader handler vill also exist.
It
represents
a
potentially allocatable resource.
Like the printer handler, it
will have no 2§IJAD!~ connection to the leyel two aodule (host
reade'r compression) with which it co.municates. The card reader
handler is being designed for general purpose future use and vill
be able to read data in several aodes. The'third level three
module is a console I/O module. This module is not allocatable
since it represents a resource shared by everyone. lny .odule aay
prasent output messages to it for display on the console.
Also,
it vill route messages received from the console to the intended
recipient of the .essage. tte fourth level 3 module is a paper
tape punch handler. It alse represents a potentially allocatable
resource and vill have no pet.anent connection to the level tvo
module (host punch decompression handler). The fifth level three
module is the, photo-reader handler. It represents an allocatable
device and vill have no permanent connection to the host reader
compression handler.
The sixth level' three module is
the
r~ader/Punch/interpreter
handler.
It
also
represents
a
Fotentially allocatable resotrce and may be temporarily connected
to the host reader compression handler or the host list or punch
deco.pression handlers. The seventh level three aodule is the
ASCII files handler. While it normally plays a level tvo role in
behalf of a TSB program vhich is accessing some peripberal, it
here plays a level three role. It may com. unica te with either the
host list decompression, host punch decompression, or host reader
compression handlers to perfer. the job list, job punch, or job
transmit functions for the TSB user.
Five level two .odule~ will be a part of the design. One
host list decompression module and one host punch dacompression
mod ule . will exist.
The module is directed by the sJnchrono'us
handler to obtain a printer cr punch. Following such acquisition,
11ata is accepted, deblocked, decompressed,· and translated for
delivery to the associated printer or punch handler.
A siailar
function is performe~ by a single host message decompression
module. One difference is that no allocation takes place as the
console is alvays available.' One host reader compression module
also ezists. It is activatEd by the synchronous hAndler and
1-7
\.tEVEL 1:
SY1~CHRONOUS
COMMUNICATS.
HANDLER
____ 1
,
LEVEL II
,
CARD READER
COMPRESSION
HANDLER
.
--r
i .
PRINTERJDECOMPRESSION
HANDLER· ..
CONSOI.E
INPUT
.
HANDLER
CONSOLE
OUTPUT
COMPRESSION
HANDLER
PUNCH DECOMPRESSION
HANDLER
N
rz:l
fY,
p
{j
H
~
.
LEVEL III
CARD
.READER
LINE
PRINTER·
CONSOI,E
HANDLE~
HANDLER
HANDI,ER
I/O
ASCII
FILE
HANDLER
PAPER
TAPE PlUltH
1I1\.NDLER
op~rator
co •• ands in order to allocate a reader for reading,
compressing, and blocking of data. These data blocks are then
delivered to the synchronous handler. A similar modulE Ferforms
preparation of console input messages.
Centralized coaFr9ssion
and decompression subroutines r~duc9 the redundancy of SEctions of
these modules.
Some
special comments about the design of the host list
and host reader compression modules at level two are
needed.
In anticipation cf future requirements for multiple
streams, these level two modules vill be coded 'in a "serially
reusable" manner.
This means that all potentially volatile data
associated vith a particular data stream will be isolatEd frca the
code itself.
In essence, the code may be viewed as a sutroutin9
which operates en a data stIucture provided to it.
Then the
actual level two function handler'consists only of the block of
data for a s~ream. plus those instructions needed to invoke this
"serially reusable" subroutine.
To add a s~cond or third card
reader 'stream would require, cnly the replication of this data
structure component.
Aq~it, due to the unique natur~ cf console
activity and requirements, lEvel tvo console modules will not
!ollow this design.
decom~ression
The synchronous communications handler at level one is unique
in that it is driven by nine distiLct input work queues.
Pifteen
distinct output work queues are also supported. The nu.ber of
queu~s actually used is determined at system initialization
time.
Dna console input stre.m atd up to seven card input streaas make
up eight of the input vork qteues. The ninth is a general purpose
vork queue used to receive operator control co •• ands and other
items such as tuffers. The fifteen possible output work queues
ar~
a console output work queue, seven printer output werk queues
and seven punch&d card output work queuas. Obviously very few o~
thase vill be utilized initially. communications line activity is
initiated and deactivated by this handler as dictated by operator
control commands.
RJE
The following message flew is
function:
~ossible
among handlers in the
UQ
Sends reader centrol commands to t.he hest reader
compression module, communicaticns lin~ control ccmmands to the
synchronous handler, and Iemote inquiry commands to the host
inquire compression handler, and remot~ inquiry replies to -the
ASCII files handler for the job messag'=!! fUDctio.n. Beceives
console .essages from virtually anyone.
.&21l..!21~
1-8
112.§S
~U~§§.i2n.
Sends blocks of compressed remote
to the synchronous handler. Receives reaote inquiries
from
console I/C and -operational control signals from the
synchronous handler.
ingl\;'!.'
ingu~ries
H2il
~!~
d~c2!a£i§si2n
Sends messages to console I/O and
control,inforllation-to the synchronous handler.
Receives blocks
of console messages from the synchronous handler.
~aIg
'!~
Rec~ives control
Sends card 1.ages to host reader co.pression.
signals frol card reader compression.
'!AS!' ,ompressi2D
Sends blocks of card iaages to the
synchronous handler, r9ader activity messages to console I/O, and
control signals to the leyel 3 handler (card reader handler or
ASCII files
handler).
Receives control
siqnals
from
the
, synchronous handler, reader control com.ands fro. console I/O, and
card i.aqes frca the level 3 handler.
.
]g!~
Sends control sigaals to host list decompression.
Receiv .. s print iaages fro.' hest list deco.pre~sion.
~iD~!'
li!1 12'-2gn~ desomp,ession - Sends control signals to the
synch.tonous handler, print or punch images to the level 3 handler
(printer handler, paper tape punch handler, or ASCII files
handler), and printer activity aessages to console I/O.
Receives
control siqnals from the level 3 handler aDd synchronous handler,
and blocks of cutput images fro. the s ynchrono us han'dlar.
H2~
- Sends 18ssaqes to console I/O in response to
connection requests, blocks cf output data to all level tva output
modules (host message d9cc.~ress and host list decomptess), and.
control signals to all secend leyel modules.
Receives input
blocks from all level tvo input .odules (host inquire co. pression
and host reader co.pression), co •• ands from console I/O, and
control signals from output lodules.
~nshIgnou§ h!~~
fll~§
!aaSl!~ - When ~layinq its level three handler role,
the ASCII files handler can be the source of data for the host
inquire and host reader co.pression handlers. At the sa •• tiae,
it can be the sink for the data provided by the host message and
host
list and host punch decoa pression handlers.
In this
capacity, the aodule is the link between the TSB user and the RJ!
subsystem.
ja~ll
i-9
PUDctioD
III
sectioDs.
follows:
hA!Sl~
system functi.ol! handlers are deseri bed i.n the followillg
la.as associated with these function handlers are as
Haa.
lelB
ftUIH
151'B
'l'BGH
LPRa
CBa
SpH
CIO
HIO
HflO
HIO
BLO
HPO
PPB
paR
iPR
,
Level Handler
Interconnect Kit Handler
1
ftulti~lexor Handler
lSCI! Piles Handler
2/3
Ti.e Base Generator Handler
1
3
Line trinter Handler
Card Feader Handler
3
Synchronous Communications Handler
1
Console I/O Handler
l
Host Inquire Coapression Handler
2
Host !essage Decompression Handler
2
Host meader Compression Handler
2
Host list Deco.pression Handler
2
Bost ~unch Decompression Handler
2
Paper Tape Punch·Randler
3
Photo-reader Handler
3
Reader/Punch/Interpreter Handler
3
Handlers are roug~ll classified into three leyels. Level one
handlers are typically in centrol of aajor processing areas.
Level two handlers also are involved vi th lIa jor· processing areas
and are often tery closely tied to a level one handler.
(In
exaaple is the activity bet\een Haa or HLO and SPH.) However, the
aain point which distinguishes a level two handler fro. a level
one handler, is that a level tvo handler vill acquire and control
a leyel three handler to pe~for. work on its behalf.
In order
that a given level three handler ean be used by &al leyel two
handler (e.q. lSFH-CRB or HRC-CBB), a definite message and control
flow protocol 1s defined for usinq a level three .odul.. This
protocol is defined as follows:
1.
I level tvo aodule (L2) allocates a level three .odule
(Ll) using the AD!. L2 sends a "st.art" co •• and to L3.
This coaaand is s.ent in a centrol buffer and is .used to
activate the connEction. In this buffer are paraa.ters.
n •• ded by both L2 and L3 to aaintain the connection as
vell as to injtiate it:
Bell
vord
Bit (s)
1
15-11
7-4
Punction.
ptay be used by L2 to infor. Ll
about any desired operational
modes
1-10
2·
13-8
3
14-0
7
'5-0
8
15
14-2
1-0
D~ta
1
, 5-0
Informs L3 of data streaa
identifier to be used in Bell
of all future aassag. exchanges
Queue naa. of L2 to which tutur.
aassag'es ar e ratu'rned
Length of required buffers
·in positive bytes
1 • RJB aod ale issued start
o • ISPB issued start
Ray be used as needed
Indicates basic operational aodes
Por input:
OO-read ASCII
10-read EBCDIC
Par printer output:
OO-Space then print
01=Print then space
Por pa pe r tape p uuch out pat:
OO-punch .ode in Data word 1
01=punch aode changed by control
operation
luaber ·of buffers needed
for the connection
(Zexo is not a legal Du.her)
Opon receipt of 'this .. ssage, L3 is expected to:
a.
b.
c.
d.
2.
Retain supplied infor.ation.
Pertor. any initial I/O operations (such as
.a1tting punched tape leader).
lcquire the nuaber of buffers specified in
data lord 1, interlock thea, and return
them to L2 vithBCW3 containing the queue
naae found in the start co •• and, and Bel2
containing a "nop" co•• and and data streaa
identifier as noted above.
Pree tbe control buffer containing the
·start" .assage.
L3 accepts read cr write commands fro. L2.
These will
appear in the buffers supplied ~o L2 by L3 as noted in
(1) above.
Bew word 7 is used by L2 to indicate the
desired positive length in bytes (characters) of reads
or ~rites.
Upon co.pletion of the operation, the
following occurs:
a.
b.
If a read, the doa.and is changed to ~rite.
If a write, the com.and is changed to nOPe
1-11
c.
T he
buffer is [eturned to L2 with a • PUTQ
if a write or with .PRlQ if a nOPe
If an .operation
occurs:
a.
b.
c.
co.pletes
in
error,
the following
The criginal operation is held by L3 for
later retry either after a tiaed pause or
at operator direction.
A control buffer is acquired by L3 and is
set with an ~rrcr co •• and (6), appropriate
BCi word 8 general error indicators, and
stream identification. This buffEr is sent
to L2.
For all errors, a retry must be indicated
by receipt of a type 9 co •• and.
This .ay
come directly from an operator OT .ay be
generated internally by L2. Por a type 1
or
type
2
error
(see
Bey vord 8
description), a timed retry is perforaed by
L3.
ODly when a d~vice .akes a transition
from ready to not ready should L3 report
the etror to L2.
A continued not ready
condition after
timed
r.etry
is
not
reported.
For type 3 error.s, an i ••ediate
retry is performed upon receipt of the type
9
CO • • 8
nd.
.
3.
LJ aay receive control commands froD L2. These are
defined by L3, and the buffers are discarded by L3.
5.
A ·purge" co~.and from L2 to L3 may appear in a buffer.
The co ••and vill te in a non~interlocked buffer which
~hould
be releaSEd by L3. In response to the purge, L3
should:
a.
S.
Purge any pending operations and
buffets to L2 as nop·s.·
reto~n
..
the
1 "stop" co•• ~nd frcm L2 to L3 may appear in a buffer.
The stop co •• and lust be ~n an interlocked buffer for
eventual return to L2.
L3 must do the follcvinq in
. response to the sto~:
a.
b.
Complete any pending operations.
PerfOIS any final task (such as emittinq a
·punch tape trailer).
1-12
"c.
Betura: the "stop" aessage to . L2 atter
havinCj J:eturnad ..11 read or·' write baffers
to L2. It is always the responsibility ot
L2 to release buffers.
lead and writ.e
buffers active at' the ti •• of a stop are
consideJ:8d purged. It is not necessary to
cc.plet~ operations with thea, aDd they
be returned as naps.
a"
1-13
SECTION II
SYSTEM SERVICES AND DATA STRUCTURES
--
?OOO
~~WL~TT-PArKAHn
SYSTt:-;V,
.
~F.RVTCF.S
SYST~~
PROC~S5UR
T/O
~TRUr'f"Rr.S
AJ.tD DATA
1•
rnc
OtlEflF:O TOC'
').
ACW·S
r.T.nRATI 11::;1\(;F' nf Rrvl wnHns
OM & ('\T1'
onEH~;
-~
.
4.
-
~'I\NAGF:~
InuT
.rOM. f.-
AND.
INF'npMATInN 'l'''I-H,F:
OflFtJF
-
-
()TSPA"CHF:~/CU~M(JT"TnR
TIO DTSPATr.l-fTN(;
~.
.
-.
API.. Sr.nT., RPRT
~
AND
TARJ.~
-
A"F'~r:R
MAt.l'A~fo:R.
RflFFfo:P
6.
AnM
7.
flAM & na1'
R.
MTsrFT,t.ftN"'OtTS UTHIO"R
.
PENOTNr;
PF.0UF.ST
TA~LF.
p~v
reF ~SSI \,~JMEMT M AN AGF~
D... II Tr. F ~ 5 S J GN ~ ..: N T T " BTl r-:
f-HJ
SYST~M
.c;~~PVTCF:
ROTJTTr"F:-S
~TAHTUP/P~SlAHT
rJ:'NTH1\I,TZF:V cnN~nT..F: IH1']'PlJT
DftTa
ATU~
. rn~V~RSln~
.
D~rnMPHJ:'S~InN
rnMnRFS~TnN
q.
n~VTr.F"
10.
D.04
11.
n.4':l
1'~(~
1?
TP.~H
1 n C; II " N f' L F H
S~RVTr~
S~RVlrF
TAR),'"
nOIVER
J-o
.
STJHPf)nL r.nN"'Hnl J I,TST,
A "'D
I.
Introductio~
Queued • laC. is the input/output control s.u brau.tine within
the I/O ·subsystem of the IOP ·pz:oqrall for the HP2000 ACCESS systea.
It provides for scheduling of I/O requests and notification· of the
completion of these requests. Queued .IOC. differs frcm existing
versions of .IOC. (non-buffered and buffered) in that it vill
maintain qU9ues of I/O requests for ihdividual devicEs and a
priority queuE of completed requests for all devicEs. Also,
facilities are availabl~ to ·interrogate the queue of completed
requests and to manipulate the scheduling of I/O.. D"1 use and
conflicts for use are also lIanaged and scheduled by Queued .IOC •
.
Queued .IOC. is being dEveloped tc make viable the use of Bes
type operating ~ystem in the IIO processor of an HP2000 ACCESS
system. However, Queued .IOC. need not be restricted to this use.
This dccument vill deal primarily with the features of Queued
.IOC.
which
are different from current versions of .IOC.
Reference to existing documects en Bes and .IOC. is suggEsted for
answers to que stions not covered h'ere.
II.
Design
OV Ervi ew
The major goal for QU9ued .IOC. is to generate a grcup of new
services which will er.able Bes to functicn in an
~nvircnment
baving time de~endenci~s and a require.ent for
priority handling of. events.
9~!i~nsl
~2!£i!! I!gYi'~!~n~
Queued .IOC. vill require an qquipment table (EQT) of larger
size than previous versions of .IOC.
The sp~cial microcod~
developed for use in the lOP scftware of the HP200C ACCESS systems
is also required.
J2~.2ign j.lln~.I
Quau~d
.IOC. will b~ mcdular in organization. The functions
be p~rformEd by Queu~d .IOC. are very distinct so that
modularity is quite natural.
In addition, processing which is
common to several functions can be implemdnted as subroutines.
~o
2-i
Three primary modules vill exi~t.
First is thE sodule
associated with the .IOC. entry point.
This module receives
control
froa
th6
user prcgram and processes the request
appropriately. secondary IIodules vill process the 'various types
cf requests
read, write, control, status, etc. Seyeral of
thase modules vill process :the request directl y or queue it for
1a ter proce,ssing by the I/O driver. In other cases the I/O driver
will be ant~red, to process or start processing the request.
second primary module is that associated with the .BOFR
point. Here the completed requests aay be placed on a
prioritized queue with other co.pleted requests (the CBO or
completed request queue). If ancther operation has :been reguested
and queued for the device, it vill be initiated at this peint.
The
~ntry
The third prisary scdule is that associated with the .ONS.
point. • OMS. a110"s a dri ver to place in to ,the co.pleted
reg'uest
queue,
an entry containing information about soae
unsolicited asynch~onous eyett. Such events are unsolicited in
that no .IOC. call brings the. about. (An exaaple might be the
receipt of a BREAK charactet fro. a co•• unicatioDs line.) By
placing such events into the co.pleted request queue, infer.ation
can be passed back to the use~ progras for action at that level.
~n try
11.Ql! ~ ~ntI.2l
It is i.perative that the
program through Queued .IOC. be
capabilities fellovs.
capabiliti~s
understood.
available to the user
A su •• arJ of the
Perhaps .ost iaportant is the fact that all capabilities
forllerly available throuqhnen-buffered .IOC. are still available'
and in an identical fer.. this is also true of buffered .IOC.
with the exception that aultiple RuffeI!S output requests vill not
be possible with Queued .IOC. A reading of the re.ainder of this
section vill reveal that aultiFle output requests can be deDe but
in a slightly different aanDer.
A significant new caFability exists ,to allow scbeduling Of.
multiple read, write, or cont~ol requests. coupled with ~his is
tha ability .to handle the coapletion of these requests on a
Eriority basis. The flow of control is as follovs-1.
The calling .proqral uses an .IOC. paraaeter word ha'ving
bit 15 set to indicate a .9l!!~ IUuest.
(!ay te read,
vrite, or control.)
2-2.
2.
3.
4.
5.
6.
Por .~eads and writes, the buffer supplied for the call
is assumed to be preceded by 5 quaueinqand control
words for_use by Queued .IOC.
The- • IOC. call is made. • IOC. may enter the I/C driver
immEdiately (if the drive~ is idle) or _ que~eth9
request for l~ter processing by the driver. This
latter queue is refer~ed to as the device request queueor DRQ.
Certain specialized I/O drivers do not dapend on the
device request queue but handle queueing of aultiple
reque-st.s - themse lvas.
An
exam pIe
is
the. D.51
lIlultiplexer driver-. The EQT associated vith such a
driver is marked as using no device request queue. All
requests are immediately pr~sented to the driver in
this case.
(See the section entitle~ "Self-queuing I/O
drivers" 9lsev~erE in this document.)
The driver completes the re9u~sted operation and exits
through .BOPR (an entry point in .IOC.).
.BOPR places thE completed request into the cc.p!et,d
reques~ueue. - -This
queue is arranged in priority
order.
The logical unit number is used as a default
priority. However, the priority for a given ccmpleted
request may optionally be selected by the user Eroqram.
This capability is discussed belove
The user program us@s an interrogate request to inspect
the completed request. 'queue. . In . this
way
the
observance of the cCSFleted request is made.
Since available DKA channels ara shared by all I/O drivers
needing DKA, contention for these channels exists. An I/O driver
which needs OM! but which is unable to acquire a OKA channel vill
reject the I/O call with ths B register set to 1 (DKA needed but
unavailable).
Fo~
queued r9guests only, Queued .IOC.
will
r.esolve this conflict. A reject of this sort will cause the I/O
operation to r~main queued and the EQT to be marked with a flag
indicating "wait for DMA." As 'other I/O
operations. cc~plete,
Quaued .IOC. will note the availability of OMA channels. and ,will
reschedule an EQT suspended for this reason. Note that ncn-queu3d
I/O requests are not handled in this mann~r and will still r~sult
in the traditional reject at the .IOC. call.
The interrogate request is a special • IOC. call which asks
for notification of a completed requ9st or unsolicited event. Th9
unit reference number in this .IOC. call designates the lowest
priority to be inspected. Ir. ether words, if it is dEsirad to
inspect for ccmplated requests at priority x or highgr «x), then
x is the unit reference number used in the .IOC. call.
A
rejection raturn is used to lndicate that no completed requests at
the designated priorities va~e found.
For a successful return,
regist~rs
are set to sup~ly inforllation about sOlie ccmpleted
request or unsclicited event.
Three other capabilities exist. One allows the user program
to supply the address of a subroutine which .BUFR vil1 use to
choos~
the priority at ·whic~ a completed request is to be gueued.
Between steps 4 and 5 noted above, this subroutine is activated.
The priority it returns fot the completed request will over-ride
th~
default priority (logical unit nUllber) for the device.
Another capability allows a device request queue to be purged.
All pending requests are i ••ediately moved to the co.pleted
request queue. Finally, an .IOC. call is available to activate a
~evice request queue which has been suspended due to an lIe error.
Such suspension is indicated as necessary to • IOC. whene,er an I/O
drivar indicates a need for cperator attention in the EOT status
word.
III.
Design structure
Q~gA»ii!~
2!
~!y~
,Queued .ICC.· is concernEd vith tvo queues. One is the Device
Request Queue (ORO), and tbe other is the Completed Bequest Queue
(C RQ) •
Por each EQT, a DBQ can be maintained to hold multiple I/O
requests for the unit. The'crganization of the DRQ is based on
two things.
One is a word in the EQT called the DRQ head. It
holds the address of the curtent request. 'The second thing is the
set of five queue control vords associated with each request to be
queued. For read or write reguests these control loxds are
provided by the user program.
(See "Buffer use with queued
requests" under the section cn "Data formats and .IOC. calls".)
For centrol tegues ts the centrol vords are obtained by .IOC.
Using the DRQ head and the five control vords, the DBQ is,
organized as shown in the illustration on the next page.
The CRQ has a very si lila t organization. The caQ head is
location within the .IOC. lodu1e which addresses the highest
priority completed request.
Other completed requests are then
chained in priority order. ~he same five control words used for
requests on the DRO are used for the CRQ. CRa organization is
~lso illustratEd on the next page.
As shown in the illustlation, the first of the queue control
words is used to link requests together.
The appropriate head
2-4
addresses the fr;ist request and each r-aguest in turn addresses its
successor. The last request has a zero link word. In the ease "of
tha CRQ, th~ priority of the request is stored in anotber of th9
five vords (thE last).
EQT
r---------,
1----------
r-------------------(current request)
I----~....,':----
L---~----------------
1-.. ---------(3rd request)
1---------DBC
Head
1-----..... _L--------• ..J
(last request)
L-------------------r-------~-----------(2nd request)
L-~-------~-~-------~-
Link
vords
Entry
priotity
(as b:ScSd)
r---------,
eRe
Head
L-- -.-- - - - - "
r-----~------------~~---~(3rd request)
c
L-~-~----------------~~---r-----~---~-----~---------(last request) I d
r-~--~-----~---------~---~-
(2nd request)
t
L----~-~-------~--~--~-~---
r-------------------------(to p request)
a
L .. -~------- ... - ---~~ .............. ~ .. - -
2-6
Q
U f. LJ £ D
I 0 C
QUEUED .IOC. IS THE INPUT/OUTPUTCONTROL ROUTINE WITHtN THE 1/0
SU8SYSTE.... IT IS RE:SPONSI8LE FOR THE SCHEOULING OF' I 0 REQUESTS
AND THE NOTIFICATION OF' THE COMPLETION OF THESE REQUESTS. THE
FOLLOWING TWO QUEUES ARE MAINTAINED BY QUEUED ~IOC' TO AID THE
SCHEDULING OF THESE TASKS~
.
DEVICE REQUEST QUEUa
~DRQ)
FOR f~CH QUEUING DRIVER EQUIPMENT TABLE fEQT). A DEVICE ~EQlJEST
QUFUE IS MAINTAINED TO HOLO ~ULTIPLE ·1/0 REQUESTS
EACH DEVICE
QEQfJEST. QUEUE HAS A DqQ HEAD (EaT WOfJO 4l WHICH CONTAINS THE
AOnQESS OF THE CURRENT 1/0 REQUEST AND A LINK~n LIST OF FIVE
QUEUE CONT~OL WORDS ASSOCIATED WITH fACH REQUEST TO RE QUEUED.
F'Oq CONTROL REQUE<;TS THE QUEUE CONTROL WORDS A~E OATAINE'D RY
THF .IOC~ SUBROUTINE VIA A CALL TO ~GET. FOQ READ AND WPITE
PEQUESTS THE CONTROL WORDS ARE SUPPLl~D BY THE CALLING ~ODULE
.AS FOLLOWS:
EACH READ A~O WRITE REQUEST HAS A BUFFER AssnCIATED
WITH IT. A ALOCK OF NINE BUFFER CONTROL WORDS RCW
WO~DS) IS ATTACHED TO THE BEGINNING OF' EACH t=itJFFER.
~Cw WORDS S THROUGH 9 ARE USED AY .IOC~ AS TH€ SET
OF DRQ CONTROL WORDS.
THE f)RQ QUEUE: CONTROL wORDS ARE DEF I "'En AS FOLLOW5
WORD 0
(F3CW WOPO 5)
QUEUE LINKAGE
WORD 1 ('3CW W()~D 6)
.IOC'. 1/0 REQUEc:;T PAQA~F.:TE.R
WOPD 2
(BeW WORD 7)
BUFF'ER SIZE (N/A FOQ CONTROL PE'QUESTS)
WQPD 3
(SCW WORD 8)
NOT USED
WORD 4
(~CW WORD 9)
NOT USED
---
COMPLETED PEQUEST QUEUE
(C~Ql
THE CRQ IS ~ PP.IORITIZ~D QUEUE OF ALL COMPLETED I 0 ~EQUESTS AND
OF, ALL UNSOLICITF.n EVENT ~EQUESTS (UNSOLICITED IN THAT NO .IOC.
CALL BRINGS THE~ A~OUT). THE CPQ ~EAO IS LOCATEI') WITHIN .IOC.
AND IT CONTAINS THE AODRE~~ OF THe HIGHEST PPIORITY CRQ ENTRY.
OT~ER PEQUESTS ARE LINKED I~ PRIORITY ORDER~
THF.:SAME FIVE
QuEUE CONTROL WOROS USED FOR DR'Q ENTR I ES ARE uc:;e:n FOR CPQ
FNTRIES. QUEUE CONTROL WORDS FOR UNSOl.ICITED F.VF.:~TS ARE OATAINED
~y T~E ~UNS. MODULE VIA A CALL TO .GET.
THE COMDLETION PRIORITY
OF A eRQ ENTRY FOP SOLICITED EVENTS IS THE UNIT REFERENCE NUMBER
or: THE DEvICE FOp. WHICH THE E~TRY IS AEING MAO~~ THE CO~PLETION
PRIORITY FOR UN50LICITED EVENTS CAN RE ~PECIFI~f) AY THE CALLING
nRIVF.:R OR THE UNIT REFERENCE NU~BEP CAN BF.: uC:;En AS A DEFAULT
PRIORITY.
(SEE' .lJNS. r.>F.C:;CQIPTION)
THE C~Q CONT~OL WOQDS ARE
DFFINED AS FOLLOW5:
".
2-7
WORD
WORD
WORD
WORD
WORD
WO~D
ALL CRQ ENTRIES EXCE~T UNSOLICITED EVENTS
(sew WORD 5)
0
QUEU~ LINKAGE
(SCW WORD 6)
1
.IOC. I/O REQUEST PAR~~~TER
(sew WORD 7)
TRANSMISSION LOG FROM E~T WORD 2
2
(8Cw wo~n 8)
STATUS FROM rQT WORD 1
3
(~ew wOPD q)
4
COMPLETION PRIO~ITY
---
CRQ ENTRIES FOR UNSOLICITED EVENTS
- QUEUE LIN~AGE
- TSB LOGICAL u~lT NUMBER/UNIT REFERENCE NUMRFR
- NOT U~ED
- EVENT DATA
4 - CO~PLETION PRIORITY
0
WORD 1
WOQD 2
WORD 3
WO~D
~ CRQ ENTRY IS RECOGNI7ED AS BEING FOP AN UN~OLICIT£D
EVENT BY THE FACT THAT THE COM~AND AITS OF eRQ WORD 1
(BITS 14:12) ARE 7ERO.
IN THIS CASE CRQ WORO
CONTAINS
THE EVE~T DATA W~ICH IS DEFIN~D BY THE DRIVEQ PQESENTING
THE UNSOLICtTEn EVENT.
2-8
QUEUE'n .IOC. IS,MADF. UP O~ THREE PPI~ARY MOOULE.S AND THEIR
SUPPORTIVE SU8ROUTINES. EACH MODULE HAS AN EXTER~AL ENTRY
POINT.' 'A DESCRIPTION OF THE WORK PERFORMED 8Y TH£SE BIG
TH~EF FOLLOWS:
• I 0 C •
THIS MODULE RECEIVES CONTROL FROM ~ALLING HANDLER~ TO PROCESS
VARIOUS TYPES OF 1/0 PEQlJ£STS SUCH AS READING. W~ITING. CONTROL.
STATUS. ETC. SOME REQUESTS ARE IMMEDIATELY PROCESSED BY .tOC.
AND OTHERS,RESULT IN A CALL TO THE APPROPRIATE I/O DRIVER FOR
PROCESSING.
I~ ADDITION .IOC. IS RESPONSI~LE ~OR QUF.UING READ.
WRITE. AND CONTROL REQUESTS TO BUSY. QUEUING 1/0 DRIVERS ON THE
OEVICE REQUEST OUEUE (DRQ~. SELF:OUEUING D~IVERS ~RE ALWAYS
CALLED AS THEY MAINTAIN THEIR OWN QUEUES.
THESE QUEUED ENTRIES
WILL RE RESCHEDULED 8Y .IOC. AFTER THE DRIVER BECOMES NOT-BUSY.
WHEN A ~USY DRIVER COMPLETES AN 1/0 OPERATION. IT CALLS .BUFR
~S ITS LAST ACTIVITY PRIOR TO EXITING (~Nn THUS ~F.COMING NOT~U5Y) •
ONE OF THE OPERATIONS ·.8UFR PERFORMS IS TO CHECK THE
ORQ OF EACH DRIVER THAT COMPLETES AN 1/0 REQUEST~
IF ANY EVENT
IS QUEUED • • BUFR WILL SET THE uPENDING OR,Q ACTIVITV FLAG (P FLAG)
IN THE DRIVERtS EQT FLAGS WORD AND IT WILL INCREMENT THE PENDING
,DPO ACTIVITY COUNTER. ALL .IOC~ CALLS EXIT THROUGH THE CO~~ON
ROUTINE. RETN~
IF THE PENDING ORQ ACTIVITY COUNTER IS NON-ZERO.
EVERY EQT IS CHECKED FOR PENDING I/O~ WHEN PENDING ACTIVITY IS
rOUNn. THE P FLAG IS CLEARED AND T~E IIC IS INITIATED
(5££ .IOC.
1/0
~ESCHEDULING)
.IOC. ALSO ~AINTAI~S THE SCHEDULING OF DRIVERS WHICH REQUIRE THE
liSE" OF" OMA.
IF AN 1/0 REQUEST CANNOT BE HONORED ~ECAUSE THERE
I~ NO FREE DMA·CHANNAL • • IOC. WILL SET THE .. REQUIRES OMAn FLAG
(R FLAG) IN THE DRIVER'S EQT FLAGS WORD AND THEN INCREMENT THE
PENDING OMA ACTIVITY COUNTER. WHEN AN .IOC~ REQuEST EXITS THROUGH
RFTN. A CHECK IS MADE OF THE PENDING OMA ACTIVITy COUNTER.
IF IT
IS NON-ZERO AND IF A OMA CHANNEL IS FREE. A ROUNQ ROBIN S~ARCH OF
THf EQT'S IS ~ADE FOR ONE ~wAITING D~A USAGE~
WHEN ONF- IS FOUND.
ITS R FLAG IS CLEARED AND THE 1/0 REQUEST IS RE-ISStJED TO THE
DP.JVER.
(SEE .IOC. 1/0 REQUEST RESCHEDULING)
.10C. 1/0 REQUEST
RESC~EDULING
THf DRIVER.S EOT I~ CHECKED TO SEE IF IT IS SELF-QU~UING (EaT WORD o.
AIT14).
IF IT IS SELF-QUEUING. THE DRIVER'S eRQ HEAD CEQT WORD 4)
IS CLE~RED AND CONTROL IS RETURNED TO THE CALLER. HENCE ~ELF-QUEUING
DRIVERS MUST NOT ONLY SCHEDULE THEIR OWN 1/0 REQUESTS THFY MUST ALSO
RESCHEOULE THEIR OWN PfNDING DMA USAGE. OTHERWISE THE 1/0 REQUEST
IS RETRIEVED AND THEN SENT TO THE DRIVE~. NORMALLY THE DRIVER wILL
RFTUQN BUSY AND' THEREFOR 1/0 REQUEST RESCHEDULING IS DONE'.
I~ Tt:i E
2-9
=
REQUEST IS REJECTED. THE ~UFFER IS MARKED AS PURGED EaT WORD 1
140311), THE ENTRY IS REMOVED FROM THE DRQ AND PLACED ON THE CRQ,
AND THE ORa IS SUSPENDED (EQT WORD 1. RITI3=1)~
I~ THE REQUEST
IMMEDIATE COMPLETES. THE ENTRY IS REMOVED FROM THE ORQ AND PLACED
ON THE CRQ.
IF ATTENTION IS REQUIRED (EQT wORD 1. RITI4=1), THE DRQ
IS SUSPENDED. OTHERWISE, THE DRQ HE~D IS AGAIN CHECKED FOR MORE
PENDING 1/0.
IF THE DRQ IS NOT EMPTy. THE CYCLE WILL RESTART •
• IOC. REQUEST
PARA~ETER
A SINGLE WORD PARAMETEP IM~EDIATELY FOLLOWING THE J~A TO .IOC.
oEFINES THE TYPE OF 1/0 REQUEST AND DEVICE TO BE USED
IT HAS
THE FOLLOWING FORMAT:
15
~
Q=
14
12
11
~
: FUNCTION : SU8FUNCTION
c;
0
UNIT REFERENCE
QUEUED REQUEST INDIC~TOR
1
REQUEST IS TO BE QUEUED FOR P~OCESSING ~Y THE
1/0 DRIVER~
THIS INCLUDES SU8SEQUENT QUEUING
OF THE OPERATION IN THE COMPLETED REQUEST
QUEUE WHEN DRIvER PROCESSING 15 FINISHED.
o
NO ·QUEUING OF THE I/O REQUEST AS IT IS TO BE
PPOCESSED IMMEDIATELY RY THE nRIVER.
NOTE: MIXED USE OF QUEUED AND NON QUEUED REQUESTS
'WILL RESULT IN REJECTION O~ THE REQUEST ~Y
.IOC. MIXED USE IS POSSIALE ONLY IF ALL
REQUESTS FOR THE DRIvER HAVE REEN COMPLETED.
ONLY READ. WRITE, AND CONTROL REQUESTS CAN
fiE QUEUED".
2-10
F'UNCTION=
A NUMERIC VALUE INDICATING A GE~E~AL CLA$S OF
LEGAL VALUES ARE:
PROCES~ING.
o
l'
2
3
4
5
"
CLEAR
READ
WRITE
CONTROL
STATUS
INTERROGATE COMPLETED REQUEST QUEUE
·S~ECIAL
CLEAR - USED T~ TERMINATE I/O AND CLEAR THE HARDWARE INTERFACE. ~IOC. ISSUES THE CLEAR REQUEST
TO THE D~tVER ANO AFTER RETUPNING IT RELEASES
ANY PENDING D~A USAGE AND PURGF.S ANY OUTSTANDING
QUEUED I/O REQUESTS ~OP THE DRIVER
THIS IS DONE
RY REMOVI~G THE ENTRIES FROM TH~ DRQ. MARKING
THEM AS PURGED. ANO PLACING THEM ON THE CRQ.
READ - USED TO REQUEST ANY QEAO oPEPATION.
.IOC.
PUTS QUEUED REAOS ON THE DRIVER'S DRQ AND IF' THE
QUEUE IS EMPTY. IT ISSUES THE REAn REQUEST TO THE
DRIVER. NON~QUEUEO READS ARE IMMEDIATELY ISSUED.
FOR ACTIVITY PERFORMED AFTER THE DRIVER RETURNS TO
.IOC •• SEE "READ/WRITE/CONTROL REQUEST PETURNSu.
WRITE - USED TO REQUEST A~Y WRITE OPERATION.
.IOC.
PUTS QUEUED WR I TES ON THE DR I VEQ S· DRQ AND I F THE
QUEUE IS EMPTY. IT ISSUES THE WRITE PEQUFST TO THE
DRIVER. NON~QUEUEO ~RITES ARE IMMEDIATELY ISSUED.
FOR ACTIVITY PERFORMEO.AFTEP THE DRIVER RETURNS TO
.IOC •• SEE "READ/WRITE/CONTROL REQUEST RETURNS".
CONTROL - USED TO PERFORM DRIVEP DEFINED CONTROL
OPERATIONS SUCH AS A PEADF.R/PUNCH FEED REQUEST •
• IOC. PUTS QUEUED CONTROL PEQUE~TS ON THE DRIVER'S
ORQ AND IF THE QUEUE IS EMPTY. IT ISSUES THE
CONTROL REQUEST TO THE DRIVER~
NON QUEUED CONTROL
qEQUESTS ARE IMMEDIATELY ISSUEn TO THE DRIVER.
FOR ACTIVITY PERFOR~ED AFTER THFa DRIVER RETURNS TO
.IOC •• SEF.: "READ/WPITE/COP>.lTPOL REQUEST RETURNS".
STATUS - USED TO OATAI~ THE LAST ~ECORDED STATUS
FOR A DEVICE~
~IOC~ RETURNS WITH
A
STATUS tEQT WORD 1)
~
TRANSMISSION LOG ~EQT WORD 2)
=
=
INTERROGATE ~ USED BY THE COMMUTATOR TO INTERROGATE
THE COMPLETED REQUEST QUEUE'. F'OR A COMPLETE
OEseR I PT ION SE.E "I NTERROGA T I ON QEQUESTS".
2-11
SPECIAL - USED TO PERFOR~ UNIQU~ OPERATIONS
WHICH ARE DETERMINED BY THE SU~F"UNCTION.
THESE
OPERATIONS ARE:
o PRIORITY APPENDAGE - USED TO SUPPLY .IOC. THE
ADDRESS OF A MODULE TO BE USED TO DETERMINE
THE PRIORITY AT WHICH A CO~PLETEO I/O REQUEST
IS TO BE PLACED ON THE CR6~
IOC. RETRIEVES
THE APPENDAGE ADDRESS AND PLACES IT IN EQT
WORD 5.
1
PURGE - USED TO ~EMOVE QUEUED REQUESTS FOR A
DRIVER.
THE PURGE REQUEST IS SENT TO THE
DRIVER AND UPON RETUR~. ANy PENDING DMA USAGE
IS RELEASED AND ALL PENDING I 0 REQUESTS ARE
PURGED BY REMOVING THEM FRO~ THE DRIVER'S DRQ.
~ARKING THEM AS PURGED. ANn PLACING THEM ON
THE CRQ. PURGE DOES NOT INCLUDE CLEARING THE
HARnWARE INTERFACE.
.
2
REL~ASE ~ USED TO ACTIVATE A SUSPENDED DEVICE.
SUSPENSION OCCURRS WHEN A DEVICE TERMINATES AN
OPERATION WITH AN INDICATION THAT 5PECIAL
ATTENTION IS REQUIRED~
IF THE DRQ IS NOT
SUSPENDED. NO ACTION I~ TA~EN
IF IT IS
SU~PENDEO. THE SUSPENSION RIT IS REMovED (EQT
WORD 0, BIT"=O'.
THEN IF THERE IS AN I/O·
. REQUEST ON THE ORQ. IT IS ISSUED TO THE
DRIVER.
IF THE REQUEST IMMEOI~TE COMPLETES
WITHouT ATTENTION NEEDED. THE DRQ IS AGAIN
CHECKED F"OR MORE 'ENTRIES AND THE CYCLE IS
PEPEATED-·.
5UAF"UNCTION=
A NUMERIC VALUE INDICATING OPTIO~S ~OR THE
FUNCTION.
THESE OPTIONS ARE ALL ORIVER nEFINED
EXCEPT FOR THE SPECIAL FUNCTIO~
AND THE
FOLLOWING UNIQUE FUNCTION/SUBF'Ur..JCTION COMAINATIONS:
0/0
4/0
3/0
*
~UST
SYSTE~ CLEAR.
SYSTEM STA'TUS*
DYNAMIC STATUS
ALSO HAVE A UNIT REFERENCE OF O.
SYSTEM CLEAR ~ US~D TO TERMINAT~ ALL DRIVER 1/0 AND
PURGE ALL PENDING 1/0 REQUESTS~
S~STEM STATUS ~ USED TO DETERMINE IF ANY OEVICES
ARE ACTIVE.
~10C~ WILL RETURN WITH THE A-REG.
BITIS
1 IF AT LEAST ONE DEVICE IS BUSY.
=
nYNAMIC STATUS ~ USED TO ORTAI~ THE ACTUAL CURRENT
DEVICE STATUS~
IF THE REQUEST 15 ~ON-PRiORITY
(1/0 REQUE~T. BITq=n). THE REQUEST IS PUT ON THE
ORO ANO THE COMPLETION IS PUT ON THE CqQ. PRIORITY
DYNAMIC STATUS REQUESTS ARE NOT puT ON EITHER
QUEUE.
2-12
NOTE:
AIT 9 OF QUEUED READ, WRI~E OR CONTROL
REQUESTS INDICATES PRIORITY. SUCH A REQUE~T wILL
. BE QUEUED IN FRONT OF CURRENT REQUESTS.
UNIT RF.F'ERENCE=
A NUMRER USED· TO REFER TO A SPECIFIC DEVICE.
READ/WRITE/CONTROL REQUEST RETURNS
WHEN .~ CALLED DRIVER RETURNS TO ".IOC". AFTER P~OCe:C;SING p. READ. WRITE.
CO~TROL·REQUEST, THE A AND B REGISTERS CONTAI~ 5TATUS INFORMATION
WHICH RESULTS IN THE FOLLOWING ACTION:
OR
P.-~EG
a-REG
1
1
BIT15=1
8110=0
BI10=1
o
MEANING
(DRIVER RE~ECT RETURN)
(DMA REQUIRED RETURN)
(IMMEDIATE COMPLETIO~ RETURN
(NORMAL RETURN'
QUEUED ORIVERS MAKING QUEUED
REQUEST~
(DRIVER REJECT RETURN) - THE D~IVER'S EQT STATUS WORD IS
FLAGGED AS REQUEST REJECTED '(EOT wORf) 1
140"'-'77
THE. REQUEST
IS REMOVED FROM THE ORO AND IS PLACED ON THE CQQ
THE ORO IS
TH~N SUSPENDED (EQT WORD O. AIT 11
1). CONTROL IS RETURNED
TO THE CALLER.
=
=
(DM~ ~EQUIREO RETU~N) - THIS DRIVER Ie; SCHEDULED FOR DMA
USAGE BY SETTING THE "REQUIRES OMAn FLAG fR. FLAG IN HIS EQT
FLAGS WORD (EOT WORD 0, BIT 1~
i, ANn THEN CONTROL IS
RETURNED TO THE CALLER.
=
(IMMEDIATE COMPLETION RETURN, .:.. THE REQUEST Ie; REMOVED FROM
THE ORO AND IS PUT ON THE CRO'.
THe: DRIVER.S E~T STATUS IS
CHECKED FOR REQUIRED ATTENTION (EQT WORD 1. BITI
IF" ATTENTION
IS REQUIRED (BI't = 1) THE DRQ IS SlJSPENOED (EOT WORD 0. RIT13=1) ,.
CONTROL IS THEN RETURNED TO THE CALLER.
(NORMAL RETURN) - CONTROL IS RETURNFD TO THE CALLER.
SELF-QUEUING DRIVERS AND NON-QUEUED REQUESTS
(DRIVER REJECT RETURN) - CONTROL IS RETURNED TO THE CALLER
AT HIS .IOC. REQUE~T REJECT RETURN POINT~
(OMA REQUIRED RFTURN) - SAME AS DRIVER REJECT
~ETlJRN.
(IMMEDIATE COMPLETION RETURN, - CONTROL IS PETURNED TO THE
CALLER.
(NORMAL RETURN) - CONTROL IS RETURNED TO THE CALLER.
INTERROGATION REQUESTS
THE COMMUTA~OR USES THIS REQUEST TO INTERROGATE r~E COMPLETED REQUEST
QUFUE. EACH DRIVER IN THE 1/0 PROCESSOR HAS AN .IOC INTERROGATION
~EQUE5T CALLiNG SEQUENCE IN THE CO~MUTATOR~
THE UNIT REFEQ~NCE
NUM~ER. CONTAINED IN THE .IOC. 110 REQUEST PARA~F.:TF.:P
REPRESENTS THE
LowEST PRIORITY TO AE fXA~INED IN THE CRQ. THE HIGHEST PRIORITY
COMPLETED REQUEST OR UNSOLICITED EVENT IS AT THE TOP OF THE CRQ.
IF THI~ ENTRY-S PRIORITY IS NOT EQUAL TO OR GRE~TER THAN THF. UNIT
REFERENCE NUMBER IN THE INTERROGATIO~ REQUEST • • IOC WILL TAKE THE
RE~ECT RETURN.
IF THE REQUEST IS SUCCESSFUL. THF.: ENTRY IS RE~OVED
FRO~ THE CRQ AND THE NOP~AL RETURN IS TAKEN WITH THE FOLLOWING
INFOR~ATION IN THE A AND A REGISTERS:
COMPLETED REQUEST ENTRY
1/0
REQUEST
PAQA~ETER
UNSOLICITE~
BIT 15
II-I,
5':'0
BUF"FER
~DDRESS
EVE~T
OVERLOAD FLAG
ZERO
TSA LOGICAL UNIT NUNt8EQ
UNIT REFERENCE NUMAER
SY~TE~
14-1~
R-REG
EVENT .ENTRY
DATA
NOTE: THE SY5TEM OVERLOAD FLAG IS SET IN THE EVENT T~AT
ALL AVAILA8LE SYSTE~ QUEUE SPACE IS IN USE~ THE FLAGGEO
ENTRY WAS OBTAJNED FROM EMEQGENCY STORAGE AND I~DICATES
THAT SOME SUASEQIJENT UNSOLICITED EVENTS MAY HAVE ~EEN LOST.
2-14
• B U F R
THIS MODULE IS CALLED FROM THE CONTINUATOR SECTION OF ALL DRIVERS
IF THE REQUEST WAS NOT QUEUED
(PUT ON THE DQIVER'S DRQ). THE ORQ HEAD WILL 8E ZERO AND A ~ETURN
TO TH£ CALLING DRIVE~ IS IMMEDIATELY MADE.
~HOWEVER
SELF-QUEUING
DRIVERS CAN MAKE USE OF THE CRQ BY FCLLOWING THE STEPS OUT-LINED
IN THE SECTIO~ "SELF-QUEUING 1/0 ORIVEPS.)
OTHERWISE THE REQUEST
I~ PLACED ON THE CRQ AND IS REMOVED FROM THE ORQ~
~~EN AN 1/0 REQUEST HAS COMPLETED:
THE EQT FOR THE CO~PLETED 1/0 REQUEST IS NOW 'CHECKED
IF THE EQT
INDICATES THAT THE DRIVER IS SELF~QUEUING CEQT WORD
AITI4=1),·
THE nRQ HEAD (EOT WORD 4) IS SET TO ZEPO AND CONTROL IS RETURNED
TO THE CALLER. FOR A QUEUING DRIVER THE EQT STATUS IS CHECKED.
IF THE EQT STATUS INDICATES THAT ATTENTION IS NEEDED EQT WORD 1.
HIT14=1). THE ORQ IS SUSPE~DED fEQT WORD O. BIT1~=
ANO .BUFR
WILL RETURN TO THE CALLER. OTHERWI~E~ THE D~IV£R'S DRQ IS CHECKED
FOR ANY PENDING 1/0 REQUESTS.
IF THE ORQ HEAD IS ZERO • • 8lJFR WILL
RETURN TO THE CALLER.
IF THE DRQ HEAD IS NOT ZERO THE UPENDING
ORQ ~CTIVITY" FLAG IS SET IN THE EOT FLAGS WORD CEQT WO~D 0,
AITll=l) AND THE PENDING ORQ ACTIVITy COUNTER IS I~CREMENTED.
CONTROL IS THEN RETURNED TO THE CALLER.
SELF-QUEUING 1/0 DRIVERS
A SELF-QUEUING 1/0 DRIVER"IS ONE ASSOCIATED WITH AN EQT HAVTNG BIT
14 OF EQT'WORD 0 SET.
SUCH AN 1/0 DRIVER IS UNIQU~ IN THAT NO 1/0
REQUEST IS, EVER QUEUEO FOR IT BY QUEUED .IOC'.
THAT IS. NO ORQ IS
MAINTAINED.
INSTEAI"), .ALL 1/0 REQUESTS ARE IMMEDIATELV PASSED TO
THE DRIVER AND IT MUST MAINTAIN ITS OWN REQUEST QlJ~UING INTERNALLY.
THIS DEFINITION IS TO ALLOW FOR DRIVERS WHICH HANDLE MULTIPLE
DEVICES. ESPECIALLY MULTIPLE DEvICES SERVICED VIA A SINGLE HARDWARE
1/0 INTERFACE SUCH AS THE HP 1~q~n ASYNCHRONOUS MULTIPLEXER.
THIS
TYPE OF DRIVER DOES NOT wANT THE 1/0 QUEUING SERVICES OF QUEUED .IOC.
SINCE REQUESTS ~AY AE OI~ECTED TO DIFFERENT SUBUNIT5 OR SURCHANNELS.
5F.LF-QUEUING DRIVER5 DO. HO~EVER. HAVE ACCESS TO MOST OF THE
CAPABILITY OF QUEUED .IOC. SPECIFICALLY. THE COMPLETED REQUEST
QUEUE AND THE UNSOLICITED EvENT FACILITY ARE AVAILABLE.
USE OF
THE UNSOLICITED EVENT FACILITY REQUIRES NO SPECIAL INFORMATION,
AUT USE 'OF THE COMPlE TED REQUEST QUEUE MUST 8E PLANNED. QUEUED
.IOC. REQUIRES FIVE WORDS OF STORAGE IMMEDIATELY PRECEDING THE
BUFFER ASSOCIATED WITH A READ, WRITE. OR CONTROL REQUEST.
HENCE.
IF A NON-QUEUING DRIVER PLANS TO USE THE COMPLETED REQUEST QUEUE,
110 REQUESTS TO IT SHOULD. IN TURN. EXPECT THE CALLING PROGRAM TO
SUPPLY THESE FIVE WORDS.
(NOTE T~AT INCIDENTALLY THESE FIVE WORDS
COULD BE USED BY THE 1/0 DRIVER TO PERFORM ITS OWN REQUEST QUEUING.)
~JTH THESE FIVE WORDS AVAILAALE. TH~ I/O DRIVER CA~ HAVE A REQUEST
ADDED TO THE CO~gLETED ~EQUEST QUEUE BY PERFORMING THE FOLLOWING
STEPS:
NEC~SSARY
1.
UPDATE THE EQT WITH ALL
LOG IN~ORMATION.
2.
COpy THE .tOC. REQUEST PARAMETER INTO THE SECOND WOPD OF
tHE FIVE PREFIX WORDS.
(THE LOGICAL UNIT NUMBER IS THE
MAIN REQUIREMENT.)
THIS SHOULD PQORABLY AE nONE IN THE
INITIALOR ~ECTION OF THE DRIVER wHEN THE 1/0 REQUEST IS
MADE.
3.
PLACE THE AODPESS OF THE ~UFFEP (NOT THE A~DQESS OF THE
FIVE WORD P~EFIX) INTO EQT WORD 4 (THE DQQ HEAD).
4.
CALL .RU~Q IN THE NOPMAL WAY~
2-16
STATUS AND TRANSMI5SION
• U N
c::
•
THI5 MOOULE IS CALLED.~V Q~IVERS FOR UNSOLICITED F.VF-NT NOTI~ICATION
PPOCES<;JNG.
.UNS. CALLe; • .,ET TO ObTAIN THE F'I·VE I')lJF.UE CONTQOL WORD~
N£CF.:'C:;C:;AQY FOR COMPLETFD RF."QlJEST QUE:.UF. ENTQI£S'.
IF 1\10 ~OPF SPACE IS
AV~ILA~LE • • UNS. WICL ATT~MPT TO USE THE FIVF WOQns 'OF EM£~GENCY
STOP~c;E.
IF THIS TOO IS UNAVAILABLE. T.... E LOST J:.NTPY COUNTER IS
AUMP~D AND T~E ENTRV IS IGNORED~
ONCE THF. ENT~Y <;TORAGF. IS OBTAINED •
• UNS. WIL~ BUILD THE CPO.ENTRV A~O INSERT IT ON T~~ ~RQ ACCORDING
TO ITS CO~PLETION PRIORITV. THE COMPLETION PRIOQIT~CAN ~E'CO~PUTEn
PY A C:;PF.CIAL DRIVER SUPPLIED PPIORITV APPENOAGE C<;EE BELOW) OR IT CAN
RE SUPPLIED BY THE CALLING DRIVEP OR'THE DEFAULT pqrOQITV CAN BE
~EQtJE~T~D BY SUPPLYING A PRIORITY OF OCTAL '77~
Trl~ DEFAULT PRIORITY
WILL AE THE DRIVEQ'-:; UNIT PEFERE"'CE. NUM~F.R·. AFT~P EN(lUEUING THE CPQ
E~TRV • • UNS~ WILL RETURN CONTQOL TO THE nRlv~R~
PQIORITY APPENOAGt
IF A PPIORITV APPc:.:"'r)AGE IS E'STA~LIS""F'D FOR A (;rv~~IOEVICE. IT WILL
RF Et-·JTER€D AS A SIJAROUTI~E wHENF"E:.~ ~N OPERATIOPlJ ~O~ THE DEVICE'
CO~PLETES.
WHEN THE oOUTINE I~ ~NT~PfD. THE A A~n' ~ PE'GISTEPS wILL
CONTAIN THE FOLLOwING
A-REG
n-~EG
=
=
INFOQMATION~
4nnpE~S
OF AUFF£w
AnOQFS~
OF EQT
THF QOUTINE IS EXPECTFD TO RETURN wIT~ T~E A-~EGt~TFR CONTAINING
THE PRIORITV AT WHICH THF RUFFE~ IS TO' PE PLACED ON THF CO~PLETED
RF.:rJlIEST QUE.lJE:. ZERO 15 T~F HIGHEST PRIOPITV Ar-'l[) OCTAL 77 IS THE
LowEST PQIO~ITV.
A p~tnQITY
A
PAQA~~TFP.
4PPf/'~DAr;E
PV MAKIN6 AN .Inc PRTOPITv
T.... F APPF~n4G~ SUPPLI~O AS
AN AODUESS OF'7ERO ~ILL DEACTIVATF THE PPIOPITY
APPE~D4GE
IS
F~TA~LISHED
REQUEST WITH THE AOORESS OF
APp~NnAGE'
•
2-17
TAB L E
15
o
14
12
11.
10 q
o
A
.
----------------------------------------------./~,------p
•• 5
CHANNEL •
D •
:
----------------------------------------___---1 !:-------·
14
IS
1
13
13
8
o
7
-~---~------~-~--~~--~-~----------------------. I~! _ _ _ _ - - -
STATUS
A
---~--~----------~----~-----------~--~-~-----IS
2
o
14
-------------------------------------~--------,
TRANSMISSION LOG
----------------------------------------------
l _______
o
15
___
3
~---~-------------~--~-----~----~----------.
ORIV~R
ADDRESS
------_..•
f
----------------------------------------- _____ ;/~. ___ ---•
IS
0
__
-______ -------_-------- ________ -------_---_" ____ --.
nEVICE REQUEST 9UEUE HEAD
"
4
----------------------------------------------,
15
5
. ____- - -
0
-~---------~---------~------------------------.
PRIORITY APPENDAGE
ADDRE~S
----~--~~---~---------------------------------
WOP£) 0
I~
o N -
5 -
._-------------
~E~OPY ACCESS CHA~~fL INDICATO~
OMA REQUIRED ~6R ALL n~TA TRANSMISSIONS
D~A NOT PEQUIRED
DI~ECT
1
o
NON-QUEUING INDICATOR
1 NO DE.VICE REQUEST QUEUE IS USED. THE
1/0 DRIvER ACCEPTS ALL I 0 REQUESTS
IMMEDIATELY
o A DE.VICE REQUEST QUEUE IS TO R£
MAI~TAINED RY ~IOC~
DRQ SUSPENSION INDICATO~
1 DEvICE RECUEST QUEUF IS 5USPE"'DED
o DEVICE REQUEST QUEUE I C; NOT SU!=iPENDE[)
2-18
Q
p
PF::')IJJf;;F:S O..,iA
-
THE liRQ IS rsUC:;PE'NDEI) ~ECAlJSE' A DMA
CH~NNEL IS NEFOED HUT WA~ NOT AVAILARLF
AT THE TI~E THE DRIVE~ WAS ENT~QED
o
THF.: ORQ
~,"OT
I5
SUSPF."NOED FOQ r).~4A
PENnING ORG ACTIVITY
-
1
THE DRIVEQ IS ~O LON~~Q BUSY AND SO THE
110. REQt.fEST ON TOP OF" THE DPQ CAN 8E
o
T~EP~
INITIATEO
IS ~O_PENDINb hpQ ACTIVITY
THE UNIT NU~~EP n~ A
DEVICE CO~T~OLlF~
SUR-CHANNEL -
CHAN"'JEL -
THE C~·ANf'.JEL "'U~foct:P
OF.vICE
wo;.)r· 1
IN()ICATO~
1
DEVTCE
ON A MULTI-
t SELECT CODE)
FOP THE
I~T~~FACF.
AVAILAHLILITY OF OEVIC~:
o AVAILAt:l.E - PQF='VIOU''; OPEPATIO"l
wITt-tOUT EPPOP
1 AVAILA~LE - PRFVIOU~ np~RATI0~
A -
CO~f.lLETE
COMPLETE~
wITti f.kJ.J.OP
2
~OT
1
PURGED Rfo (vl 't="~T -
AVAJLAfLF -
JIO QF~UEST TN p~OGRE~S
r .... F I")Q I VF ~ r..'E' .JEeTED
TH~ LAST 110 PF (,)UF.C:;T AI\ID THE rJE"OUEST
\~AC:;. ~E::~OVE.(1· F"PO~ T~~ t)qn A"J!") P'IT ON THE
CQ(,) Oh' ~t.L T 10 4E(JU~C:;TC::; F'OR THIC:; I1EVICE'
~EQ~ p~~GfO.
I~ ~ITH~R EVE~T. TH~ CPq
F.:t.JT~If.5 F'or.; PURGFD TIO P£QUF.:5TS wILL
CON TAl N A
0F
T ... ISS T·A T 1I S
STATU!=; of THF ht.VIC~·.
IF=' THF AVAILA"ILTTY
VALUE 1<; -:a. T"'f STATU~ wTLL ~E 7F;,",,() T~ TH~
p E' Q" F. S T \II. A 5 P UFoi G ~- n n R I T l~ r l. L R F. 7 7 IF; T H F.
STATUS -
QEQU~c:'\T
M-
en p v
~onE
n~
1
wAS
PF.JfCTE'O
TPANS~ISSION
HI~JA~Y
o
ASCII 0 0
T R A,." S M T~ S r 0 f\J
L 0 (;
~Cf)
-
N U M t:s ~ ~
n F'
C H A R ACT f ~.:;
I) ~
III 0 PO S
T~ANC;MITTFD
OQIVER
A()n~ESS
-
AH50LUTt.
AO(,>f:.iF~C:;
OF THTS
t)~vlrF'c:;
I/O nYvER
DFV I C~
~EIN(.,
THIS
J F"
qF.QuF.: ST OllF.' JE Ht-: AO _ A[)OPF='SC:; OF CUP,:/F.NT
pqOCEC:;C;F.O
IF f')UEUfO Pf'QIJF:<;r
MuC;T ~E'
THF-- QE(HJF S TIS TO
Ann~~sC;
~EQUFC:;T
QI,FUrNt;
MI J~FF~
DRIVER.
RY SF.L~-QUE'UINC; nj::;lTV~pc:;
r:-L. t\ CFO ON T t-4F CO~~PLE TE'r)
SU~PLIE:n
~E
f.'()C.J
l~ur:ttE.
2-19
WOPD 5 .
PRIORITY APPEND~GE ADDRESS - THE A·ASOLtJTF:: ADDRESS OF
.
THE PRIORITY APPENDAGE ROUTIN~~
2-20
- DATA
TRANSMI~SIO~
F'tJNCTIONC;
(P)
(p·...
(PEAD/~RIT~)
= II?
J5F1
I)
• IOC.
(Q.FUNCTtON.SUAFUNCTr~N.UNITl
(P+2)
(~EJECT RETURN,
(F.HJFFER AODQE SC:; l
(AUFF"f'P Lf"lGTH)
(NOQMAL RETURN,
(P+3)
(P+4)
(u+S)
,:'t,I'\ICT 101'-1 c;ELEC T
F'IJf\JCTION
-
=1
(P)
JC;R
(P+})
(P+?)
(P+3 )
(PF.JEt:T
~ETtJr,.,N)
(NORMAL
RETU~N)
• Tt)C •
(F'IJ"JCT I ON" 5U F1 F"UNC T ION .ll,.11 T)
C;TATlJ~/CLE~Q
F"'''')CTIO~CS
=4/0
(;,) ... 1)
• I OC.
(F'UNC T I O~" I. IN TT ,
(P+2)
nJOQ~Al.
(P)
J<;R
~F.:TU~N)
I ~ITF.~~OGA T I n"J
F'I.I"JCTION
= '5
(P)
(P+l)
(P+? )
J~A
(P+ 1)
(~()~." 1.\(.
• IOC.
(,:'Ijf\JCT I ()N" U".JI T ,
(PEJF.CT
~E'TUQ~,
~E T Ut'-.lN 1
P\JQGE"/REL£AC:;F.
t:"I,f\ICTION
CP)
(P"'l)
(P"'~)
=
f,
,J C; ~
• I n t: •
( F' I JNeT ION " S II ~ F' l ! ~I C T lOr-; • lJ I'\i IT'
("'I")'J~AL
RF.TUP"J\
00***0**********************************************
2-21
III.
Design Structures
~l~RAl .g~! §1ruc1~
In the following sectiens, precise bit-level definitions of
system-wide or global data structures are given. In the strictest
sense of the vord, only the SCW's are truly global data structures
since they are known to virtually every module of the systell.
None of the ether data structures outlined here are known to any
modules except the system lanagers or supervisory ccmponents.
Hence" they are not global. However, because all of these data
struct~r9S are of major importance to
the total system design,
they are gathered together here for completeness and clarity's
sake.
'
Nine buffer control vords are contained in the first 9 vords
of each buffer. Words 5 thrcugh 8 are required by Queued .IOC.
for I/O scheduling, but these vords may also be used for
interhandler comaunication whenever no intervening I/O would
destroy the contents.
Word 9 is used for queueing and is
therefore volatile at the interhandler level. However, vord 9 may
be
used to co •• unicate between a handler and a driver. Words 1
through 4 are used for inter- and intrahandler communication and
for retaining such fixed information as buffer pool nu.ber and
size. These vords are never destroyed by IOC.
Word 1
Bi t (s)
15-11
10
9
8
7- q
3-0
Function
Handler defined status flags
Reject
=0 - acce pted
=1 - message rejected
Purge
=0 - no purge
=1 - massage purged
Interlock
.
=0 - no interlock
=1 - return buffer to sender
Handler defined st~tus flags
Buffer Pool nu.ber
Word 2
8i t
(s)
15-14
13- 8
7-4
Function
(Reserved for fut ure use)
Data stream id number
(Reserved for fut ure use)
2-22
3- 0 .'
Buffer type in4icator
sO - no op~ration
=1 - write
-2 - read
=3 - enable or start
disable or stop
=. - purge
=S -
-6
abort or error
=7 - operator command or directive
=8 - control operation
=9 - start error retry operation
=10-1~ -reserved for future use
=15 - allocat~d buffer
Word 3
Bi t (s)
15
14-0
Funct,ion
Unused .
Name of sender*
Word 4
6i t
'(s)
15-0
Punction
Buffer length
(vo,rds)
Word 5
Used by • ICC. onl y
Word 6
Used by .IOC. only
Word 7
Used by .IOC. and by handlers,
to communicate message length
Word 8
Used by .IOC. and for interhandler status information
Function
Defined by individual handlers
General error type indicator
(as used by ASCII files
handler, eta al.)
6i t (s)
15- 3
2-0
no err~r
.
not ready condition (type 1 error)
=2 read check error (type 2 error)
=0
=1
=3 data check error (type 3 error)
=7 .end of file
Word 9
Bi t
(5)
15- 14
13- 8
Used by handlers to communicate
this infcrmation to I/O drivers:
Funct ion
Driver specific flags,
Stream
2~~23
id~ntifiers
(to identify
cne of several devices controlled
a driver such as the 12920
aultiplezor driver)
D~iver specific flags
by
7-0
Used by the Queue ftanager as the
chain or ~ink word when linking
buffers onto a work queue
The appropriate BCW words are set by the sending handler
before queueing for another tandler.
It'should be Doted that
.IOC. will not disturb words 1 through 4 of the BCW·s.
tera "nalle" is used for clar ity's sake (See QIT).
refers to the address for the OIT entry of the sender.
*The
Here it
the follo~i~g secticns are discussed th~ system managers:
~anager, Buffer Managet, and Allocate/Deallocate Manager •
In
Queue
..f.Y.I!~ t i.Q!lsl g~2g:j. ".~~: ion
The Queue ~':anager
prcvides the cOMl1unications link between
function handlers. Much work created for a function handler is by
qU-3ue p.ntries, auii the Queue Manager manipulates the proper queues
to route commands.' messages, etc., in tuff~rs to and frca function
handlers.
Th~
Que.ue
..::.mager has several entry points each sUPFlying a
service to callil"l:] ftlncticn handlers.
The ent.ry points are:
1.
2.
3..
4.
S.
.PUTQ
whic:l Hill enquEue .work for a gi~len function handler.
• PRIQ uhich is the same as • P UTQ exce pt that thE entry is
placed first in the desJgnated queue.
.GETQ
\lhi(~':
rf'.:turns a queue ent1:Y for processing to the
calling hant1:~~c and d~queues the entry.
.SEEQ
whic::\ is the same as .GE'rQ except that t.he entry is
nrit removed irom the queue so that on subsequent ~SEEQ. calls
the same qUGla entry is returned to the handler.
.PURQ which removes all entries from u queue and returns
buffers t.c t:l.a proper lccation.
uses 01: the QM depend on identification 'of a specific
the one VhOS9 CIT entry
The queuo in question will be
in registeI A. This parameter is referred to az
address c:..ppears
the queue name.
All
iu~ue.
Upon receiviraq control ftcm a .POTQ or .PRIQ call,'the queua·
manager uses the destination name to access an entry in the QIT.
Tha buff~r is then chained intc the vork queue associated ~ith the
QIT entry.
If the queue ~as em~ty, tha pri~e gate is s~t. to
~ispatch
the function handlqr that is to process the qU€U€ entry.
If the queue wa~ !lot empty,· the QZ-t returns to the caller.
Opon receiving control from a .GETQ call, the Q~ u~es th~
calling handler name to dequeue the first entry in the quau~. Thq
r~~aining
queue depth court is placed in re~ister A, and th~
address of the queue e~~~ent is placed in register B. In ca~e of
a
.5EEQ call t~e action is the same as .GETQ except the queue
2-,25
~ntry is not rEmoved from the queue.
If the designated queue has
been purg~d, both .GETQ and .SIBQ will return this indication with
a zero valu,e in register B. This is to be considered a "10gi(:a1"
work entry.
Por this reasen, .SEEQ will continue to return this
indicator until it is relievEd via .GETQ. If a queu~ entry is not
prasent, the prime gate for the calling handler is closed to
prevent dispatching the handler again, and th~ handler is notified
of thE empty queue condition •
• PURQ uses .GETQ to empty a 'queue, routing buffers back to
the sendar (if the sew word 1 interlock bit is set), cr freeing
thgm through the Buffer Manager.
Calling Sequences
1.
.PUTQ or' .PRIQ
Calling sequenc~ js:
LDA
LDB
JSB
2.
NAME
BUFAD
• PUTQ
Load destination queue name
Lead buffer address for enqueue
Call OM
.GETQ or .SEEQ
Calling sequenc~ is:
LDA
NAME
JSB
JMP
STA
5TB
• GETQ
NOQ
Lead calling handler queu3 name
Call OM
Ne queue antry available
QCNT
BUFAD
Save
of
returned
addr~ss
queu~
elememt
Note that if a queue ettry is nct availabl~, a r~turn to the
calling handler is to the wOId immFdiately following the jump-to~ubroutine
instruction; when a queue ~ntry is available a skip is
taken to tha SEcond word. fcllcwing th~ J5B instruction. Cn - return
to th~ caller, the QM plac~s in R~g A th~ curr.ntdeFth of the
qu~ue (number· of werk ~ntries curr€ntly in the queue).
In case the qu~ue was purged previous to the .GETC call,
return is with 'a'skip, how8ver, rGgister B is zero.
2-26
3.
. • PURQ
Calling sequenc9 is:
LDA
JSB
RAttE
• puaQ
Name of queue to be purged
The Queue Managet maintains all work qu~ues as linked lists
chained by addtess. QI~ votd one pcints to the fitst queue
~lement and the link word of that queue element ~oints to the next
queue element and so on. 011 WOt~ two points to the last queue
element in the linked list. The link word fo~ each element is BCW
word 9.
2-27
The Queue Information ~atle contains one entry for each work
quaue in the system. Generally, one work queue exists for each
function handler, although ~ultiple vc~k queues could ccnc@ivably
be associated with a 5ing19 function handler.
It is through thes~
queues that one function handl~r gives work to anothEr via the
Qu a~e Manager.
The
term
"name"
is
asseciated
with
the addr'9Es cf a OIT
entry. A name is obtained from the Allocate/Deallecate Manager
an1 1S· used by a producing f~nction handler to designate the
consuming or receiving function handler.
The QIT consists of tvo segments. First are all of those
entries which represent non-allecatable resources.
The second
segment consists of all those entries which represent allccatable
resources.
This sEcond segment is ord~red by TSB logical uni~
number (not to be confused with logical unit numbers for lep .IOC.
calls) •
Each entry consists of
j
verds as follows:
Word 1
Bi t (s)
15- 0
Word
Funct ion
Address of first buffer on thE
work queue or zero if no wotk is
queu~d.
This word may be thought
cf as the queu~ head.
2
Bi t (s)
15-0
Word 3.
8i t fS)
·15- 0
Function
Address of last buffer en the
wcrk gueue or the address of this
wcrd if no work is qu~ued. This
wcrd may be thought of as the
g,ne ue ta i 1.
Function
Queue entry count (number of
buffers on the work queue)
Word 4
Bit (s)
15
Function
Allocatable r~source flag
=0 - not allocated
=1 - allocated
2-28'
14
13- a
Queue status flag
=0 - queue normal
=1 - 'queue has been purged
.IOC. logical unit number
7-6
5- 0
Unused
B1 t (5)
15-0
Function
Address of associated handler's
~l:ime 9& te
Bit (s)
15-0
function
Address of associated ha~dler's
initialization entry point or zero
if no initialization is required'
~~B
.
logical unit number
Word 5
Word 6
Word 1
81 t
(s)
15- 0
. Function'
Device name (class and number)
fer device associated with this
QIT (see Allocate/DeallocatE eanager)
. 2-29
In the following
system are discuG~ed.
The
secticns,· supervisory
Oispat.c'~0.r module js the master
:~nager, and the various
components of the
'interface betwEen queued
.IOC., the Queuu
function handlers in the
The Disp(\' ~her Dlu~t perform scheduling offuncticn hahdlers
in tvo cases, npn~ I/O 'event cc~pletion and ~hen primed b~ th~
Qu~ ue Manager.
rop.
Function h :-..:Jlers arg nodules \1hich perf orm
ta sks. USl1Clll y .. \ ':.11 are assccia ted ui th an I/O
~ ajor
pr.ocessing
devica.
These
han~lers have ~~\ ~ources of wcrk:
coupleted IIO operations uhich
th-ay have previo' ,;17 schedulErl ilnd work given to them 'by other
handlers 'Tia th,::5.c work queuE. for this reasen, handl·ers have tvo
types of entry p~tnts in ~ddition to an initialization entry
foi n t.
One i!~ ::or dispatc hing vhen I/O oper ations co mfleta, and
the other is fer dispatching uhen uork appears on a work queue.
Thr:!
folloui!lg :':\ming convar.tions for these entry points are used
vh ~ re xxx is a b~·,!.'i ic module namE:
scheduleu cr prime entry
I/O cc~pletion entry
XXI BIl
XXlaC
''Iha HP entry po~.!lt is always entere(~ via JSB. The He entry point.
is entered via Ji;P. ~ll G~cits from these ·modules folloHing a
dispatch (i.e. i~ntry at alther typa of entry point) must be done
with a JMP to tho ~xtc~nal sy~tol .• COll. ~hich is the be9inning of
th3 dispatcher's
cc~mutator.
f~£~§.§1ng alg2~ith~§
. The Dispatcher
dispatcher •.
has
two
~art5:
2-30
a
commutator . and an I/O
The commutator conEists cf several levels of' dispatching
soft ware. Each level has a ssocia ted wi th ita soft ware' priority.
The levels of the commutator ex£cute in priority ord~t. At the
gnd of the commutator, following the las~ level, is a JHP back to
the top of the commutator. !hus tbe entire lOP syste~ will loop
in the, commutator.
As .wcrk ',becomes available, it' will ba
dispatched from its appropriate level by leaving this lccp.
'Dispatching softllare at a commutator level consists of an
.IOC. completed event r:gu~st and one or more functicn handler
prime gates. 'The .IOC. call removes completed I/O events from
IOC's completed. event queue. These are than turned. over to th3
I/O dispatcher.
Function handl&.~ prime gates are simple two
instruction sequences of this form:
GAT E
R 55
JSB ENTRY
is to a prime entry point in a function handl~r. Tha
generally an RSS instruction to prs-:;rent entry to the
handler.
The Queue Mana"ger manipulates this gate, making it
aither an RSS or a-NOP, depending on availabl~ vork. The gate is
o~en€d
(NOP)
when .PUTQ' s cr • PRIQ=s of i~'ork are dCllE:: alld is
closed CRSS) when th~ work q ceue has been ef~'! ptied via • GETQ' s.
Note that due to the use of the J5B, a handler is abla to open· or
'close its own ga te.
Th9
JSB
UGA'fE" is
The I/O dispatcher receives centrol from all commutator
levels ,whenever a completed IIO ~vent is located.
Using the
lcgical unit number for the I/O op~ration~ the IIO dispatcher
performs a table look-up and dispatches the associated handler at
its I/O completion entry Fcitt.
12£A4
~A1s 2~~]~1~~~
Since the system is based on a BCS environment, an .IOC.
logical unit numb~r is associated with ~ach IIO device.
Also, a
specific function handler ~ill ~xist to control each I/O devic~.
Therefor.~, association betweEn the logical unit
numbers and the
function handlers is nec~ssary in crd~r to dispatch the proper
function handler tc process the completed IIO ~vents for th;
device. . Thus, a table of tr.e function hand19r I/O compl~te entry
point addresses is kept., !he table is ordered by logical uni~
number and is called th€ IIO DiE patching Tabl~ or lOOT.
2-31
ILQ
Q.~~!ching
Ie.h12 JIQQ!l
The
lOOT is a tablE cf function handler antry point
3ddresses. These ara the entry points for the' s~ctions of the
handlers vhich handle ccmlleted I/O events.
This table 'is
maintained 'in .ICC. logical unit number order so that
an
association bet\-1,,!'~n I/O events and function handlers can be made.
The lOOT is used by the dispatcher to ent~r a functicn handler
wh3n a completEd :~,:O event i~fcund.
The lOOT format is:
Word 1
Word 2
ddress of l/e completion entry point fer
:.09 local unit number 0
.\ ddress of I/O completion elltry point for
~~. "1 ical unit number 1
.~
•
•
etc.
since no BCS standard unit numbers (logical unit numbers 0 through
6) are used in tl! '! system, ~"cIds 1 throl1gh 7 contain tho address
of .COM. and y1<;:'.0 no effectivta dispatching.
2-32
l!!.ti~.u,gjl.sl
g!!.§giEll-21l
The Suffer Manager is a modu19 which provides a central
control point for obtaining and releasing buffers by function
handlers. It manages the centralized buffer storage area or pool.
The buffer pool is divided into subpools of two general types.
structured sub~ools are pr~built with a fixed number of fixed size
buffers. These subpools are typically used vhen hardware or other
system requirements demand a guaranteed number of tuffers. A
single unstructured subpool js also availabla. From it, buffers
of varying size can b6 obtained. All storag~ not used tY'program
modules or fixed dat~ structures ~s available to this subpool.
The Buffer Manager has two entry points: .GETS and .FREB. .GETB
provides a buffer from a sub~ocl and .FREB allows a handler to
release a buffer to a subpool.
When
called, the 8u ffer Manager useS-- the tu ffer subpocl
. number to map to a Subpool Ccnttol List (SCOL) ~
The seCt holds
necessary information about the subpool, such as what tuffers are
free and how many requests fcr these buffers may be outstanding.
As well as maintaining the tuffer subpools a provision is made to
stack .GETB requests for handlers when .GETB requests fail due to
buffer unavailable conditicns. ·A Buffer Pending Request Table
(SPRT) is associated with each seOL to record information about
handl~rs
with buffer pending requests. These requests vill be
9vantually satisfied when the buffers becom~ available through
.PRES.
When the tuffer manager is entered via .FREB and the SCOL
for the buffer heing returned shows a handler waiting for a
buffer, that handler will te given the buffer via a .PRIQ. In
this case BCW word 3 will be cleared and sew word 2 vill be set
with a command code of 15.
(See Buf·fer contr,ol Words.)
The SPRT retains infcrmation. about handlers which request
buffers when 'no bu ffers are ava ilab le. Th~ number of s lets in th~
BPRT is equal to the number of work queues in the QIT. Each BPRT
slot then corresponds to a sfecific work qu~u~. The contents of
the slct indicate the number cf buffers required by tha associated
work queue. Initially this EPBT has all z-aro tantries.
If a
handler requests a buffer from th~ associated subpool and none is
available, the following processing occurs:
1.
The queue nam6 of tha caller is used to generate an
index to the 3.ssociated SPRT slot.
This
slot is
2-33
incremented to shew the requirement of the caller for a
buffer.
2.
A master
count of required buffers in the seOL (word
three) is also incremented. If this master count vas
zerc~
the seOL fetch pointer is set to address this
nevly incremented BPRT slot. The handler's pri.e gate
is close to prevent further processing until the
requested buffer is available. A "no b~ffer"returD is
effected.
When a buffer is returned
following procEssing occurs:
to
the subpool via .FBEB, the
,.
If sew lIord 1 bit 8 is set, then the buffer is
interlocked. In this case a true .PREB is tot done.
Rather, a .PUTQ tc the name in Bew word 3 is done.~
2.
If the
occurs.
3.
The fetch pointer in the BPRT is used to calculate the
queue name index. 7he queue naae is then generated,
and the free buffer is assigned to that queue. The
count for that queue'naae is reduced as is the .aster
count.
4.
If the aaster count is now non-zero, the fetch pointer
is advanced to the 1lext non-zero BPRT slot ... This fetch
poi1lter is always nsed in a round robin fashion. That
is, each BPRT entty vill be exaained equally often so
'that a handler requesting aultiple buffers vill not
receive all of thEa prior to other handlers.
This is
to prevent lockoat conditions by handlers making heavy
demands of this sabpool.
aaster
count
is
zero, no further processing
lL1!tUJ,ang
ca~ling
.GETB, -
Sequences
o bt ain
bu f fer
Re~ister
A must contain the nase of the calling
handler. RegisteI B must contain the desired buffer
sub pool number. ~he calling sequence is:
2-34
LDA
LDB
- NAr!E
PULNO
J5B
JltP
5TB
.GETB
NOEUF
SUlAD
•
•
• FREB -
free a buffer
Register A must ccntain thE buffer address of the
buffer to be releasEd. The calling sequence is:
LOA
J5B
BUFAD
• FREB
•
•
•
Requests for buffers frem sub Fool zero are for tuffers of
length supplied by the callet. Th~ calling sequence to ."GETS for
this subpool is modified as fellcws:
LDA
LOB
QUEUE NAME OF CALLER
LENGTH OF REQUIRED BUfFER
NAME
LNGTH
COM PL E ME NT
C MB, INB
JSB
• GETB
JMP
STa
LEN GT H
REQUEST BUFFER
RETURN IF NO BUFFER
NOBUF
BUFAD
NORMAL RE'!'URN
should be noted tha~ this calling s~quence to .GETB differs
from ether calls to .GETB in its use of register B.
Normally,
regist~r
B supplies the r.uabet of the subpool' from which th~
allocation is to occur. In this case, ~egister B indicates ~he
length of the cuffer required. The negating of this length then
implies use of sub~ool zero. ~his is the only subpool for which
this is tru~.
The lenqth ~hculd nct include the 9 BCW words.
These are automatically sU~Fli~d by the Buffer Manager.
It
In order to handle trese- rEquests, the buffer manager will
use the BPRT for this subpool in a diffar~nt manner. In the event
no buffer is available, the requested length will be saved rather
2-35
than a count.
The ,module !EMRY will be used to
perform
allocations.
If the requ~stEd length is such that the tuffer can
never be supplied, centrol vill be returned to the calling handler
as in a nor.al return, and t 1:e B register vill contain the aaxiau.
size of buffer that can ever be requested. The A register -ill
contain a -1 value.
Note that the subpool zero SPRT can only
retain information about 2~i size of request at a tiae by a given
handler. If multiple outstalding requests occur, they vill all 'be
satisfied with the last requEsted size. It is assumed that this
is the mode of use for this sutFool.
The use of the SCOL fetch pcinter when a buffer is returned
to the subpool is as follows:
1.
The buffer is returned using nEMRY.
2.
The BPBT entry addressed by the SCOL fetch Fointer is
used to ottain the length of a buffer ,required by a
vaiting handler.
3.
If a buffer of this length is available, it is given to
the requesting hatdler. The fetch pointer is adjusted,
and processing continues at step 2 for othel Fossible
buffer allocations.~t the first occuranee of nonavailability, processing ceases.
If any ~equests tor buffers cceur when other handlers are
waiting on the BPRT, those requests are not satisfied (they are
added to the BPRT). The eoatination of this technique and the one
of satisfying BPRT entries it crder guarantees that all requests
will even'tually be satisfied. No lockouts can occur. 1 .aster
count of pending requests is aaintained in the SCOL. This is used
to detect pending requests at the'tiae of new requests.
For this subpool, BCi word 4 is especially iaportant. It
holds the length of a buff9r allccated from subpool zero.
It is
needed by the Buffer !anager in releasing the buffer to the
subpool. Therefore, no user of such a buffer aay .odify BCW word
4.
2-36'
§. ub e~.21 £ c nt,!.s.l 1i.§~
1.§£2U
One Subpool Control List is .associated with each buffer
subpool and is used by the Euffer Manag.r to control buffer
,llocation/deallocation.
It is also used in conjuncticn with its
associated Buffer Pending Request Table (BPRT) to control delayed
allocation
of
tuffers vte~ r@qu~sts" cannot be immediately
sa tisfied.
A pointer list to the
as follows:
PULPT
DEF
OEF
~COL's
is maintained
a~
locaticn PULP!
SCOLO
SCOL1
•
etc.
Each SCOL has the
Word 1
*
Word 2 •
Word 3
Word 4
Word 5
Word 6
fcllo~ir.g
fermat:
At load time - contains the address cf the 1st
word" of the buffer subpool.
At run time
contains the address of the 1st free kuffer (or
zero if none are availabla.)
At load time - contains the address of the oat.3,
area (1st wcrd after 9 sew words) of the last
buffer in the subpocl. At run time - contains
the address cf the last free 'buff~r
(or the
address of this word if none are availarIE).
Helds a master count of pending buffer requests.
Holds address of next BPaT slot ccntaining ~
pending raquest.
Hclds the address of th~ 1st 8PRT slot.
Holds th~ address of the last word cf the BPRT
plus one.
*
For "subpool zero (variable size buffers), wotds 1 and 2
of the seCL are initially zero and are not used.
term "address of l:uffer lf always means the addrESS of th.::
first data word of the buffet. It is assump.d that the preceding
wo rd s
ar ~
the
B CW w0 r ds •
Be if w0 r d 9 is us e d by bot h the 8 u f f e =
Manager and Queue Mana~er to link buffers tog~ther on the free
list (SCOL) or work quau-a (QIT entry) resp9ctively.
The
2-37
The following subpools are currently in use:
o
1
2
variable length buffers
. Control buffers (available for general use)
Console messa9E buffers
(Terminal user buffers are taken permanently from subpool
zero during system initialization.)
2-38
!H!~l.s!: .f~.n.
JSB
DEC
• DCO!
is the byte address of the data to be
decompressed. This must be the address of the
first seB it the data.
(to addr>
is the byte address of the destination of the
dEcompressed data.
is the positive byte length of thE buffer to
rEceive the decca pressed record.
Upon return the rggisters vill contain the following:
A-register: Length
of decompressed record (9 if EOl record).
a-register: Pointer to next RCB in source buffer.
!2S!: If there, is more data in the compressed record than is
availab19 in the b.uffer, excess data will be truncated.
The
l~ngt.h ·returned vill never be greater than (buffer length>.
2-54
~i§~~11ane2Y~ §I~!~ §2~~i~ rcutine~
The following service rcutines are available
for use by any modules:
". COMP provides a dat a cOllpression service to co.pact records
according to the IBM lDultileaving" forma t. It" is typically called
by inpot compression hand19rs and is thought to be an BJ! r~lated
lIodule.
The routine" is enterEd via a JSB with the parameters in
registers and following thg call.
It returns a value in a
register. The calling sequence is as follows:
LOA
LDB
JSB
DEF
• COMP
(~o addr>
is the number of bytes of data in the block to
be compressed.
(to addr> is the byte address of the destination of the
compressed data.
The RCB and saCB are not
supplied by .COMV. The caller is assumed to have
already inserted these characters. This address
aust point to the location where the first seB is
to go.
Upon return, the B-r~gister will contain the byte address of
the next location in the- destination buffer following
the
co.pressed data.
The Device !able is" constructed
Program to provide information about
supported by the total system.
The
follows:
the I/O configurator
non-shareable
devic~s
fo~mat of the table is as
by
".
• DVTB DEF *+1
DEC n
DEC m
contains # of supported
Contains # of following
OCT a,b,c,a,e Five word entry for 1st
OCT f,g,h,j,j Five Mord entry !o~ 2nd
TSE ports
entries
device
device'
•
•
etc.
A total of "mit five word c1evice
for each is as follows:
Word 1
Word 2
Word 3
Word 4
Word 5
&ntri~s
ui,).}
exist.
'the format
Device designato~ 0~ name
(Refer to Allocat ,/Deallocate Manager)
Dev ic~~ se 1 ect. cc.<,,': in bits 5-0
fit '5 is a one j,"": the device is
capable of inp-ut "nd bit '£1 is
one if the dtavic':; j.s ca pable of
output.
Eit 12 i:; set if the only
output allo~ed i~, CTL.
.
Maximum record si~,~ for davice
Zero
Zero
A TSB logical unit number is associated with ~ ~ch deviCE. Devic~
Table entry numbor corresponc1s tc TSD logical ',,}lit numbe!: 0 and so
forth.
2-56
2-5.7
I.
. Introduction
lb.Q! l!.Q~£ t:~i1L~.ll~U l12.S.Y.l~
'Ih is mod ul e v ill sto re- the sta te of the system in the I/O
Processor (lOP) at power failur~ time. At power recovery time,
working closely with all I/O drivers and cooperating with the
System Proc~ssor (SP), the saved information vill be used to
restore the software to its cperating state. It is e tasic design
point of this module that sufficient r9cov9ry information is
maintained
to
"'insure thE completion of all scheduled I/O
op~ratlons.
However, due to the impact of power loss at the
actual I/O devices, some IIC OFerations will necessarilJ ccmplote
in error or with data loss. ~his is a point to be addressed by
the individual I/O drivers.
II.
Design Overview
Two primary processing sections make up 0.04. Both are
triggered by . an interrup-e through . in te rrupt vector 4.
The
direction of the interrupt (pover failure cr pover restart) is
inspected in order to dispatch. the appropriate processing section.
Power failure processing saves register contents, l/e device
states, and DMA processing states and then halts the cpu.
(This
rontine does take into account the possibility of a power failure
during some previous power recovery operation.)
Power recovery processlng includes a cooperative restoration
qf interconnect kit states with the system Processot. Then device
states are restored, and. I/O driver pover fail appendages are
given centrol to correctly restore their states relative to their
r~spective
devices.
Finally, registers and interruFt system
states are restored, and the operating system ~egains centrol.
III.
Design structures
R2!sSiQD§hi~
21
~~.
12
!h~ Syst!! fI~sess~I
Proper restoration ~f the system following a povEr failure
requiras
close
cooperaticn
with
the
System
Processor.
sp~cifically,
the correct operational state of the interconnect
kit must be maintained, ~ince it is mora properly viewed as an
9xte~sion
of each central processing unit than as a peripheral.
An a~xifiary catle between the two CPU~s ensures that each vill
receive the pover loss signal at the same point in 'time •. This
techni'3ua constraIns their pcver failure interrupts' to occur ft'O
2-58
t:"S9
more than one instruction a~art and insur~s that the state of the
interconnect kit device flags can be. saved. However, the status
of
any
DftA
transfer
over the interconnect kit must be
reconstructed.
(DMA is inhitited by a power
failure interrupt.)
Also, power failures occurring during previous pover recovery
attempts must te carefully ncted, so as to prevent improper
changes in the recorded systam state. Obviously, D.04 FtCCessing
rp.lated to the System Processor is very dep~ndent on toe 0.61
Interconn~ct
Kit I/O driver.
Much of what is stated here is
further documented in the D.€1 Base Design Specifications.
<3
Each processor must maintain six words of information. One
of these, POWFF, is a fla~ local to the power-fail/power-up
routines.
It is used to assist in identification cf pover
failures occurring during recovery from a pr9ceding one.
BCRNO
and SCHNO contain the last words sent (exclusive of a DMA
transfer) ~n the interconnect
rec~ive
and
send
channels
respectively.
These are obvicusly needed to restore the state of
the interconnect. OMAFL is e stat~ variable ccntaining the DMAon-interconnect status of the proc~ssor program. It is used to
determine if the power failuIe disrupted a OMA transfer.
The
final two wotds record thE length, starting memory addrESS, anj
direction bit of the most recent n~A transfer on the interconnect.
Th~ir
existence allows tha recovery routine to restart an aborted
transfer.
.
Since the order in wh fch the pre ~ssors lifl1 COlD Fleta their
recovery routines cannot b~ predicted, ~~o sequencing requirements
must be observed. First, each word placed on the intarconnect is
to be r€corded in either RCHNO cr SCHNO as appropriate before
issuance of the 'STC SC,CI which signals its presence to the other
processor.
Second, neith~r processor can
proc~ed
to
its
interccnnect DMA routine until after exscution of the last
instIuction aff~cting the system proc~ssor's send fla~ and I/O
proc~ssor's
rEceive flag,
r6gardless of which prOCEssor vill
execute the instruction (i.e., cne processor' may have to wait for
its flag to be set by thE ether· procassor). This ccn~ition is
automatically m~t by the handshake requirements of POS, ALE, and
RJE.
It is also a fallout of the design for SCI, TC~, and the
requests for the devic~ tabl~ (SDT) or cold dump core imagE (KSN).
However, use cf XRe requires that the I/0 processor wait for its
receive flag to become set, aft€r transmit~ing the transfer length
word, before invoking its interconnect ·DMA ·routine.· (Note:" POS,
ALB, etc. are.all mnemonics for commands processed by D.61 in
conjunction with thp. System· Erocessor.)
2-60
~E~~l !i~~2EIgg£A!3!Ag ~ R9~ ~lLrest~£S
Three special microprcgrams vill' be written to aid I/O
in power' recovery processing.
Ther. are two basic
questions which an I/odri ler vll1 need to answer in' dete.r2ininq
correct power recovery action:
driv~rs
1)
2)
Has a specific llC instruction been executed?
Is
an
interrupt section engaged in p'rocessing
at the time of a pover failure?
int~rrupt
an
The first question can indicate vhether an interrupt was
being anticipated at the time of a failure or whether specific I/O
interface conditions had bGen established. The best way to answer
this guestion is to set a software flag which marks the fact that
an associated I/O instruction has occurred.
Hoveyer, using the
basic instruction set, a power failure could occur between the
I/O instruction and the instruction which sets the software flag.
This would result in an inability to answer question one easily.
Por this reason, a microprcqram vill exist that vill inccrporate
the execution of'the I/O instruction with the setting of the
software flag. Its calling sequencevill be as follovs:
PlRIO EQU 221 E
•
•
RAft PPB'IO
Ie
STC sc,C
FLAG
OCT
0
IO can be any I/O instruction which does not involve k Ot B. PLAG
will be set to 1 by PlRIO.
It is assumed that PLAG vill be
cleated by an interrupt handler or other point where the effect of
the I/O instruction has been noted.
The second question lust be answered in order to deteraina
the ptOp9r action to occur telat~ve to a pending or existing
interrupt
condition.
Thtough
the
use
of
tvc
special
microprograms, the value of the interrupt ent~y point can be used
to ascertain the activity of a driver's continuator seg.ent. Por
purposes of discussion, let I.XI denote an entry point for a
driver continuator section. An interrupt typically invokes a JSB
to I.XX. Hence if I.XX is assembled as zero, the interrupt vill
force I.XX nen-zero. Thus, a test of I.XX can indicate activity
IJf the segment. The only r91aining problem is . to incctporate a
clearing of I.XX when exiting through I.XX. The tvo sicroprograas
Z--61
perform this function.
On3, in addition, incorporates
microprogram noted above. calling seguences are:
the
PP'RIO
PFREX EQU 223 E
•
•
RAM PFEEX
DEF I.XX
PFREI
EQU
Ie
•
RAM PFREI
STC sc,c
FLAG
OCT 0
2~2E
•
DEF I.XX·
In both cases, control will be transferred to the location whose
add'ress is found in 1.11 (as in a JMP I.XX,I).
Also, I.XX, vill ba
set tc zero.
lLQ
driv!I ~2n~i~!Ia!i2a§
During pcver recovery ~rcc~sslng, each 1/0 driver must be
given an opportunity to ncte the failure and take ~ossibla
corrective action.
D.04 assumes that aach IIO driver contains a
subroutine entry point, P.XX, in addition to its D.IX and I.XX
3ntry points (that is, its initiat'or and continuator entry
points). After restoring the state cf the int~rconnect kit, D.04
will f:nt~r ea ch 0 f the P. X X subroutines.
It is assum Edt hat p. xx
will de some or all of the fclleving things:
1.
SincE it is possible for power to fail during a pover
recovery op€ratio~, P.XX may not be able to' ccmplete.
In addition, shoeld this cccur, P.XX vill be restarted
not continued. Per this reason, P.XX must not alter
i~i data or
variables which it n~eds to perform its
work.
2.
I/O interface ccrtrcl word regist~rs may.nEEd to be
restored. An example would be the speed and other
paramet~rs
for
th3
ports
on
the asynchronous
multiplexer int~rface.
3.
Power fail or other status may n~ed to be rEccrded in
the E OT status wo td.
(Th is is onl y necessar y if needed
by
other portions cf the dtiver or as a part of status
return€d in IOC calls.)
2-62
4.
Due to the fact that the correct nesting of active
interrupt sections (c~ntinuators) .ust be restored at
pover recovery ti.e, D.04 requires that· no continuator
allow itself to be . intel:~upted by lover . priority
con tin Uators.
5.
When pover ~~ restored to the system, all devices flags
are set artd all centrol flip/flops are clear. That is,
an interrupt is pending.
In addition, the state of
device flags at pcver failure time vill be sayed. Each
P.I! appendage must restore its driver relative to
thes.e fla 9S:
State of I/O
driver interruFt
state of
saved flag
Action
to be perforlled
Idle
Clear
Clear
deyice
flag if
appropriate. aeissue any
I/O
instructions which
may have been lost (see
PP~IO microprogram).
Idle
set
If
an
iDterrupt
is
pending, issue an
STC
instruction to allow it.
otherwise,
clear
the
flag.
Reissue any lost
I/O. instructions.
Active
Clear
Allow
an interrupt to
occur in order to restore
the
proper nesting of
interrupts
(see
D.041
below).
Then clear the
de~ice flag.
Reissue any
lost I/O instructions.
Active
set
Allow
an interrupt to
occur. Reissue a~y lost
I/O instructions.
section
As noted above, in the discussions of the PPREX and
PPREI microprograms, the activity of an !n~errupt
section can be determined from the value of its entry
point. Testing the saved state of the device flag and
allowing an intetruFt for pIoper interrupt nesting are
tvo functions provided by D.04.
A subroutine called
.
2~63
D.04? may be called by any P.lt appendagE with the
select code of a device 1n Iegister A.
D.041 always
returns a non-ZEro A if the saved state of the device
flag is set and a ZEIC A otherwise.
In addition, if
register B is set to a -1 valu~, D.041 viII allow an
interrupt on the select code in order to restore its
nested interrupt condition.
~2!~~ ~n E~~!~~
a!S1i2E
The power-down routine distinguishes between four possible
cases. 1) If power fails during normal time-sharing, powrF = 0
and the restart address is not within the recovery proc9dure.
Hard ware regis ters are sa ved (A, B, P, 5, E, 0, an d F). . Th9
states of the interrupt system ~nd all device flags are saved. 2)
If powEr fails while the SP is not time-sharing (during systam
shutdo~n,
system- loading, cr after the SP has completed shutdown
or fail~d), the SP viII not s~ve its state or attempt to recover.
Ihe I/O processor (lOP), howev~r, is normally still active
(waiting for the SP to signal resumpti.on of system activity) and
does not distinguish this case frcm th9 preceding one. 3) POWFP
= 1 identifies a pover failute fro~ the recovery routine prior to
restoration of the interccnnect.
Sinc~ no system activity has
occurred on eith~r processor as yet, their current states are
ignored and rEcovery begins anew frcm the information recorded at
the initial failure. ij) If EOWPF = 2 or the restart address lies
within the rEcovery routite, then the intarcon~ect vas restored
but the processor had not yet completed the remainder of its
recovery_
This differs f tom case 3 in that the other processor
might have completed its rsccvery and returnad tc its pre-failure
~ctiv1ty.
Having donp so, it might further have executed an
instruction which legitimately altered
the
state
of
the
interconnect.
Each
procesEor is responsible for correctly
restoring its send channel (5ilultaneously restoring the other
processor's
r=c~ive
channel).
Thus the processor in ~his
situation need only determine if its send channal flag is now set
(it ~ould not have been cleared by the othar processor) and,. if
so, overlay the previously rEcorded state.
state variabl~ D!AFL allows detaction of atorted D"A
on the interconn~ct. It must b~ s~t to zero whenever
time-sharing begins in orj~t to synchronize the processcrstates.Each entry to the intercor.nect DMA routine first saves the
transfer parameters and then increments DMAFL to the' next odd
value. Wh~n the processor's hardware DMA flag com~s set, it
increments ·its D"AFL to the next even value, executing net less
than thrae instructions to ensure that th~ other prOCEssor has
time to complete its current instructicn, possibly steal one cycle
The
transf~rs
2-64
for OMA channel 6, and then ~erfor. the last cycle for D!l channel
7.
(All interconnect Dl!A act~vity occurs on channel 7.) Note that
this is only a convention,based on the assuaption that D"A channel
6 can not steal III cycles. ,If channel 6 did steal all cycles
th~n the required three inst~uction sequence vould fail to
insure
that' the other processor had in fact completed its Dftl transfer.
(No procedure can guarantee ccim~letion if DftA cbannel 6 perfor.s,
in this manner.) l~ the last tvo bits of both processor's state
variables are EV&n (00 VS. 00 or 10 vs. 10) then no transfer is
active.
DKAPL vill be odd C01 or '1) while a processor is in the
critical portion of its transfer routine. The other processor's
CMAPL will be one less (00 95. 01 or 10 vs. 11) if it bas Dot
reached its transfer'rontine, or vill-be equal'(01vs. 01 or 11
VS.
11) if also in its tra r.s fer rout ine, or will be one .ere (10
vs. 01 or 00 vs. 11) if the transfer completed.
The reaaining
combinations (00 vs. 10 cr 01 vs. 1') cannot occur since the
~rocessors
,can never be more than one state apart. This assumes
t.hat both' processors reset Dl!APL'to zeto at system initialization
time.
Possib14
.af
12f
00
00
01
01
01
10
10
10
11
00
01
00
01
10
01
10
11
10
11
00
11
11
11
00
*
IMA~L
Combinations
Neither processor in its transfer rQutine.
lOP doing transfer, SP not yet to its transfer routine ••
SP dOing transfer, lOP not yet to its transfer routine ••
Both SP and lOP in their transfer routines ••
SP in its transfer routine but transfer is cCBplete.
lOP in its transfer routine but transfer is ccaplete.
Neither processor in its transfer routine.
IOP doing transfer, SP not yet to its transfer routine ••
SP doing transfer, lOP not yet too its transfer routine ••
Both SP and IOP it their transfer routines ••
SP in its transfer routine but transfer is co.plate.
. IOP in its transfer routine but, transfer is ccaFlete.
Transfer vill be restarted. The SP must set its send channel
flag/IOP's receive channal flag according to the transfer
.direction.
Impossible D"APL Ccmbinations
SP:
Iep:
00
10
01
'1
2~65
10
00
11
01
The lOP power-up reoovery routin~ is straightforward except
for restoration of the interccnnect. It begias by setting POWFP
to 1 .and then re~enabling ~ower-fail interrapts. The WCS module
is restored.
Then the P.61 interconnect kit iriver power recovery
appendage is entered. P.61 ~erforms as follows: since recovery
requires an exchange of infcrm~tion~ th~ lOP must cl~ar its
r~ceive
'channEl flag and then waft, enou~h time for the SPI to
complete its power-down routine, clear its receive ,channel flag,
~nd transmit its data.
Th~ lOP routine do~s this by inccrporating
a timing factor into its wai~ loop. If the loop times out, then
the SP must not be active and th~ IOP shou1d restore its£lf to thg
same stat9 as it wculd be in fcllowing rec~ption o£ an SSD from
the SP. 'fter clearing'its receive channel. flag, the S P will send
a word containing zero bits Except for the diraction bit of the
last DM! transfer (1 if frcm the lOP, 0 if from the SF) in bit 0
and the last two bits of its CHAFL in bits 2 and·'. The recovery
routines are now in synchlcnization~ thE lOP responds with its
most 'recent DMA direction bit (C if frcm tl:a· IOP,. 1 if. from the
SP.) and the low two bits of its QMAFL in the same format.
At this point both prccessors have a complete' record of the
interconnect's state at pow~I-fail. The lOP automatically. places
thg current value of BeHNO cn its r~ceive channel and sends it to
th~ SP.
If the lOP's DMAFL is od1 and the SP's information
indicates that the transfer 'did not complete, the IOP makes a note
to reinitialize its DHA routine later in the recovery process.
The lOP now waits for the SP td set the IOP's send channEl flag.
When this occurs, the rop examines its record of the flag at the
time when power failed.
If it vas clear, the lOP restor~s the
word from SCHNC and issues tte 'STC n,C' ,to t~ansmit it. Finally,
POiPF is incremented to 2 sitc~ the interconn~ct is now completely
r~stored (the SP ~ill not fitish its recovery until well after the
IOP finishes all of the above). The remaind~r of the rop routine
~onsists
of ensuring that an a~orted OMA transfer cn
th~
interconnect will be restarted, ptrforming the out-of-line device
recovery routines, res~tting POiFF to 0 after r&turning to the
power-up routine, restoring the harav~re registers and interrupt
s.ystem flag, and resuming tiDe-sharing.
.
2-66
I.
Introduction
D~ 43 is a . somewhat unusual
driver in that it .ay becal.led .
direc:;:tly" by other' drivers as vell as by standard .lOC. 'calls trail
a user program. For convenience, driver calls ~ill be designated
as Line' Timer Bequests and .10C. calls as System Tiller Bequests~
The' followin.9 fu.nctions are available frail this dri ver:
1.
"star~"" - EnaHles clock inte trupts.
15ust be executed at
system startup to enable timing facilities.
2.
"Set Timer"
. Request by .caller to be notiti!d atter
specified tim~ interva.l expires.
3.· "Cancel Timer" - Ca~cel previous timing request.
tesidual time, interval.
Beturns
II.~ :, ..~e_~i9n . 0 v Erv i ev
t
~!t~!~Ul .§.!!ml!la r
I
The driver is a module of the IOP so£twa~e for the HP2000 ACCESS
system." "The driver will provide .1 second timing resolution for
requests. Hardware requirements ara'~ 2100 computer and time base
generator 12539A. The HP2000 ACCESS I/O processor microccde is
·required •.
III. Design Structures
.Q~ll §!~y£tY.U§
term TOE is used to' refer to a 1i!!£ 2~~u~ ll!!!DS. The
of an area to be used as a TQE must be passed to the
driver as a parameter in all calls. The form of a TQE is shown
belove (Only the first two words must be preset by the caller.
These ~ords are not disturbed by D.4J.)
tha
~ddress
12J t2l: .tin!
LTQE
DEC
DE·!'
ass
n!!!ll:
l!.!g,y!l!:t.
Number of • 1 sec6~d ticks tb time
Exit address upcn. timet completion
1
Flag/link word used by driver
Bit 1~
=0 - sy~tea ti~er request
2-07
STQE
ass
1
DEC
DEF
BSS
Number of .1 secor.d ticks to time
Exit addrase for timer completicn
1
Flag/lick wcrd used by driver
Bit 1~
=0 - system timer request
=1 - line timer request'
Bits 14-0
link address
1
ExpiraticD clock value for TOE
sss
thg
=1 - line timer request
Bits 14-0
link address
Expiration clock val ue for TQE
start r~gu~st puts. the Time Base Generator "9n line" and
all timing requests and must be executed by the user
to enable !i! timing functions.
~nables
~rogram
the start algorithm is outlited below:
1.
Enable I/O board interrcpts.
2.
Return.
Th3 calling
s~quanc6
JSB
• IOC.
OCT
XI
is as fcllcws:
where XX is logical unit numher.
~!!
!i.m:ZI
The s~t timer requ~st enablES timing to causa asynchroncus return
after caller s~ecified time interval. The execution s~guenc~ for
this routine fcllo~s:
1.
Insert request in timer queue.
2.
Return
The calling seguence for this routine is as follows:
'2-68
1.
Line Timer Request
ATO!
DEE
LDA
, 'JSB,
2.
TQE
ATOE
.LTS.
address of TQE to "A"
Line Timer set
·Beques~
System Timer Request
JSB
OCT
JPlP
DEP
ass.
• lOC.
2.sJJXX Where XX is logical unit'number
B!JCT
STQE Address of TQE
1
When
the time interval e%pires for a line tiller reques-t, the
address of the TOE is placed in register B, and a JSB to the exit
routine specified in the ~QE is .ade. The system is disabled
during this exit. Por syste. ti.er requests, the address of the
.expired TOE is returned through .IOC. as an unsolicited event.
!hs cancel timer request is used to ~ancel a previous tiainq
request. The driver will return the nuabar of ticks re.aining to
expiration in vord four cf the TQE. The execution alogrithm
follows:
1.
Search timer queue
reject ad dress.
fer
specified TQE.
If ,Dot found, take
2.
Remov'! TOE from queue, and store residual tick count in TOE·
word 4.
Note that' nor.al TOE expiration results in a zero
word 4.
J.
Return.
The calling sequences for this routine are as shown belel.
1.
Line Timet Requests
LDA
JSB
,J~P
ATQE Load J with address ,of TOE
• LTC. Request cancel
ERROR Reject address
2.
System Timer Requests
DEF
JMP
DEF
.IOC. -IOC call
1P~XX Request cancel
REJ
aej~ct address
-SlQE TOE address
BSS
1
JSB
•
A reject· indicatEs the specified TQE was not in the ti~er queue.
!his may indicate th~ timer ~as already expired before the call
was made to cancel it.
The
P.43
receives centrol from C.04 at pover
generatdr decade value is Ieset. If
was active, th9n D.041 is invo~ed to
restore the interrupt condition of the interface.
otherwise, an
STC is issued to reactivate the timer.
ap~endage
recov~ry time.
The timp b~se
th~
1.43 interrupt handleI
2-70
.....:1.
,~'
This handler ~BGH) provides system timer service throQgh,the
D.43 tile base generator dri,er. In one sense TSGH is not a true
handler since it does not cc: •• unicate with other handlers .tbroaqh
the .ediua of work queues and the queue manager.
Instead " its
services are utilized throuqh JSB calls. TBGH does use .IOC. to
drive the time base generator and is dispatched by DSPCH upon
completed event' notifications. It passes control to other aodules
also through JSB ~alls.
Specifically, TBGH provides calling
.odules the ability to:
1.
set a timer
2.
can cel a tiller
3.
provide a routine to be called when a tiller e%pires
system initia lization TBGH is entered at location
A START call to the ~BG driver is issued and the routine
. During
~BGHI.
exits.
Por tiaer requests TEGH is entered at entry point TBGHQ.
Processing consists of a SET TI!ER request to the TBG driver using
the TOE providEd by the callEr and exit to the caller.
Por purqing of tiaer requests the entry point is ~BGHP.
Processing consists of a CANCEL TI!EB request to the TBG driver
with the TOE poi~ter provided and an exit to, the caller.
Expired timer request ptocessing occurs at entry peint TBGHC.
Word 2 of the 8zpired TOE contains the address of a Frocessing
routine.
It is entered via a JSB call, return is to the location
following the JSB. Exit is to the dispatcher.
calling sequences:
TBGH
expires.
is entered at lccation TBGBC
The call1ng sequence is:
2-11
vhene':.,~r
a ti.Er request
LDA
LtB
par am'
par 8112
Jl'P
'!BGHC
Th 03" exit
JPlP
To
copy ef IOC parameter word
address cf TOE
proce dure is:
• CO!.
queue
a
timer reqcest TEGH is entered at locaticn TBGHO
by;
LOA
JSB
address of TOE
param 1
TBGHQ
The routine ezits by:
Jl1P
TBGHQ,I
To purge an
location TBGHP by:
LDA
JSB
Th~
outstanding
par am 1
TBGHP
timer
request TBGH is Entered at
address of TOE
exiting prccedure is:
Jr1P
TBGHP,I
if thE
ISZ
JMP
TBGHP
TBG HP, I
if thE tCE is purged
TBGH
is given
location TBGHl ty a
JSB
contrel
~QE
cannot be located
during
system
initialization
at
TBGHI
control is returned through a
JMP
TBGHI,I
called routines:
TBGH makes requests ef the tille base generater through
standard .IOC. calls.
Tiler
completion
notifications
are
processed by a caller provided routine." The routine is accessed
by:
2-72
JSB
LAI+TQEV2
A,I.
,JftP ,
.Co!.
RAM
address of service routine to reg A
call toutine (reg B cOll1tains TOE addr)
exit after return
~~~51 gA~ s~~~H!~
Every timer ·request is ccmmunicated to 1BGH through a ~l.er Queue Element (TQE). The TOE is 4 vords long and is defined "as
follows:
.,
WORD 1
,
15
,
0
time r inter val
number of .1 second ticks in requested imterval.
WORD 2
1S
0
.process pointer
address of
expiration
a
routine
to be given control at time interval
WORD 3
.15
1 q-O
=0 - system timet request'
=1 - line timer teques~
lil!k wc'rd
WORD 4
15
clock expiration value
two system link ~ordt to be used bI the device driver.
'allowing any cancel or axpiration, the fourth TOE. word
contains the number cf ticks remaJ.nl.ng (0 in the latter
case). This is referred to as the interval residual.
2-7-3
I.
Product Idantification
~i~~Q]Igg£am £2mE2~~n12
:2£
tli~QQ A£~j~~ lL~ E!~§22I
Microprogramming will make a signific~nt contribution to the
Froject. Of primary concern is efficiency.
Microprograms are
being designEd and impl~mented to reduce processing time for
certain fr~qu~nt high-overh~ad instruction sequences. A secondary
gain will be mad~ in the areas cf fl9xibility and storage
utilization.
II.
GEneral Desigr.
Overvi~w
This microprogram saves the contents of the registers, which
is a ccmmon a~tivity in interrupt handling, subroutine entry, etc.
A,
S,
E, and 0 are "push~d" onto the stack a i1ressed by register
F.
(It is assumed that this stack. pointer is initially loaded
using an OTA instruction to s~lect cod~ 5.)
Pushing is in the
direction ~f higher memory addr9sses. the contents of A, B, E,
and 0 are not char.ged.
This microprogram has been assigned to macro 105362. An
exam~le of its use follows.
) 628
SAV E
EOU
SUB
OCT
o
RAM
SAVE
DEFINE SAVE MACRO
SUBROUTINE ENTRY POINT
SAVE REGISTERS ON ENTRY
•
•
etc.
since a stack mechanism is used for saving of registers,
nesting of saves is possible. Note that the save microprogram
does no· checking for ~xceeding the size of the stack area. ~he
size of this area must be carefully chosen to handle the maximum
possitle number of nest~d saves.
~his
microprogram complements the save register prcgram.
"pops" A, A, E, and· 0 from the stack address~d by register F.
This microprogram has b~~n assigned to macro 105340.
example of its use follows.
2-74
It
An
RESTR EQU
SAVE EQU
SOB
CCT
340B
3628
0
RAM
SAVE
D'EFINE RESTORE ttACRO
SAVE ttACRO
DEFINE
SU~BOUTINE ENTRY POINt
SAVR REGISTERS ON ENTBY~
•
SUBROUTINE
•
•
RAM
JMP
. RESTR
SUB, I·
.!!~~g
PROCESSING
REGISTERS
EXIT FROM SUBROUTINE
RES~ORE
I
ng~!iI
This microprogram' loads the A register with the current
content of the F register. This will allow saving the valua of P
-accross power failures.
this microprogram has been assigned to macro 105220. An
example of its use follows.
READF EQU
BAM
STA
SAV EF
•
•
ESS
220B
DEFINE READ F !ACRO
READl
LOAC A FROM F
SAV"EP
STOBE F VALUE
1
I.9i\d.Jllj:!,
This microprcgram allows loading of bytes (8 bits) into the A
register.
Character handling, message handling, and. buffer
unpacking can ce facilitated by this microprogram. A byte address
is defined as a word addre~s shifted left one bit into bits 15-1.
Bit 0 is ·then used to addr~ss byte 0 in the vo~d (bits 15-8) or
byte 1 (bi~s 7-0). The load byte micrc~rogram loads an addressed
byte into A register bits 7-0 and clears A registar tits 15-8.
The byte ~ddress is supplied to the microprogram in the B
register.
The microprogram increments B to the next byte address
after loading A.
!his microprogram ·has been assigned to macro 105320. An
example of its use follo~s.
LBYTE
EQfJ
320B
DEFINE LOAD BYTE !leBO
LOB
BBL
RA [1
BYTEA
GET ADDRESS
LBYTE
LOAD THIS BYTE
STB
NEXTA
SAVE ADDRESS OF BYTE 1
(A New CONT AINS 000 377)
•
BYTEA
•
DEF
OF 'WORD
DEVELOP ADDRESS OF BYTE 0
DATA
2-7~
OAT A OCT
NEXTA ESS
171401
1
~2l:~.Jl:tll
This micrcprog~am is the store ccunterpart to loa~ byte. It
will be us~ful in buffer packing and ether kinds of character
handling.
As in the case of load byte, the B register is used to
address in1ividual byt~s. A register bits 7-0 are stored·into the
sp~cified
locaticn without modifying the acco~panying byte in the
same word.
A register bits 15-8 are ignored, and the contents of
A are not altered. B is incremented te the next byte address.
This microprogram is assigned to macro 105300. An example of
its USE follows.
SBYTE EQU
lOB
HBL
INB
LDA
EAM
STB
•
BYTEA DEF
DATA
ASe
NEXT BSS
ONE
~sc
300B
DEFINE STORE BYTE ~ACRC
GET ACDR ESS OF WORD
DEVELOP ADQRESS
OF· BYTE 1
GET CHARACTER "1"
BYTEA
ONE
SBYTE
STORE THE " 1"
SAVl NEXT B YT E ADDRESS
(DA'TA NOW CON7AINS "A 1")
NEXT
DATA.
10, A
1
1,
1
l£Jl.9Y.!
Many operations in the project involve the use of queues
which are maintained as linked lists of elements. Fer each such
queue, a pair cf queue centrel words is maintained. The first
word addresses the first element in the queue (the head), and the
second word addresses the last element in the queue (the tail).
An empty queue is defined such that the head is 0 and the tail
~oints to itself.
The
engue microprogram places an element on a queue.
Regist~r A addr~sses the pair of queue control words and
regist~r
B addreSs~s tbe element to be add~d tc the queue.
(the link vord
for an elemant is assumed to be at the address in B minus one.)
The microprogram causes a .skip wh~neyer the element is added to a
non-em~ty queue.
Normally, the enque microprogram places the
element at th~ end of the linked list (via the tail). However,
the element may cFtionally b~ placed at the beginning of the
linked list. This is referred to as a priority engue. Registers
A'and B ar9 not alterea.
2-76
This micrcprcgram is assigned to macro 105240. An exa.ple of
its use follows. Macro 105257 provides the optional priority
enque.
ENQ
EQU
tD!
LOB
RAM'
240B
DEPINE ENQ !AeRO
QCRA
ADDBESS OF
8~AD. TAIl
ADDBESS OP !LE!ENT
ENQUE THE ELEMENT
(Q UE0 E WAS El1 PT Y)
(QUEUE WAS NOT EMPTY)
ELA
ENQ
FIRST
QCW A
JMP
•
•
DEF
AT
EtA
~EF
ELEfIt
ADDBESS OF HEAD, TAIL
ADDRESS OF NEW ELEMENT
~Slll~
The deque microprogram removes an ~lement from a queue. A
skip is performed whenever an element is successfully removed from
the queue
(q u.eue vas non-empty).
As in the case of the enqae
micro~rogram, register A add~esses the head and tail words.
The B
teqlster is used to return the address of the dequeued ale.ent.
Register A is not altered.
This micrcprogram is assigned to macro 105260. An example of
its use follows.
.
DEQ
QCWA
EQO
2608
DE.FIN E DEQ
LDA
QCWA
ADDRESS OF HEAD, TAIL
BAM
JMP
•
DEQ
GET
EMPTY
(QUEUE IS EMPTY)
(QUEUE ~AS NO~ EMPTY)
RT
HEAD, TAIL ADDRESS
•
DEF
In the event the* queue
teqister will contain zero.
is
AN
em~ty
! AeRO
ELEMENT
(no-skip return), the B
. this microprogram facilitates access to control blocks,
tables, etc.
It uses the B register as the base addr4ss of an
area cf storage up to 32 words long. An ind~x value from -16 to
15 may then be added to th~ contents of B in order to load A from
any of these
32 locations.
The index value is supplied as a
signed four bit number in the low order five bits of the macro
which
invokes the microprogram..
B is not altered by the
micro£:togram.
~his
microp~ogram
is assigned to macros 105020 to 105057.
Note the special use of bits q-O. An example of its use follows.
2-77
.~
LA!
EQU
LDB
RAM
ATAS
LAI+l
DEFINE LOAD A INDEXED . MACRO
SET EASE ADDRESS
LOADS CONTENTS OF W1 INTO A
LAI+14
LOADS CONTENTS o F
040B
•
•
RAM'
ATAB
WO
Wl
W14
•
rEF
sss
ESS
ESS
ESS
~
14 INTO A
wo
1
1
12
1
Stor~
A indexed is exactly the store cour.terpart of load A
indexed. R~fer to that description for basic details.
This micropto~ram is assigned to macro 105060 to 105117.
Note the special use of bits 4-0.
This microprogram cc~putes cycl~c redundancy check characters
required in telecommunications error detection procedures.
The
eRe result is developed by operating on each character of the
messagE vi~b this microprogram. A cha~acter is supplied to the
micro~rogram
in the A register bits 7-0.
The eRe result is
develo~Ed
in thE word follcving
the
macro
invoking
the
micro~Iogr:3:m •
1bis microprogram is assigned to macro 105150. An Example of
its use follows. A and B are not modifi~d. The ir.itial value of
the CRC r~sult shculd be zero.
CRe
EQU
LDA
FAr!
RSULT OCT
•
, SOB
NEXTC
eRC
o
DEFINE eRe MACRO
NEXT CHARACTEF TO BE APPLIED
APPLY TO CRC RESULT
eRe RESULT
RETURN TO HERE
Word move transfers blocks of Un" words of storage from one
of me~ory (source) to another area (destination). The A and
B
registe:s
supply
the
source and destination addresses
respectively, and the count or Un" is supplied as an inline
param~ter in th~ location following the invoking macro.
The count
must be a positiv~ integer. A negative or zero value vill result
in an eff~ctive NOP. Th9 microprogram is interruptable. For this
are~
2-78
reason, it requires a second in11ne parameter word for interrupt
use which must be assembled as zero. A and B vill be modified.
this mic~opregram is assigned to macrc 105200. An example of
its use follows.
.
tiMOVE EQU
200B
IDA
LDB
PROM
TO
BAM
WMOVE
DEY
FIVE
CCT
0
•
•
paor!
DEF
ASC
TO
DEP
PIVE
DEC
ESS
DEFINE WORD ~OVE ~ACBC
LOAD SOURCE ADDRESS
LOAD DESTINATION ADDRESS
ftOVE DATA
ADDRESS OP AMOUNT TO ftOV!
*+1
5, ABCD::!.FGrG.J
*+1
5
5
:Ill '!Q!s!
Byte move is like the vord move microprogram with these
additional facts. Bytes rather than werds are moved. " byte is 8
bits.
Tha source and destination addresses in A and B aust be
byte addresses.
(A byte address is defined as:
bits 15-1 contain
the vcrd address and bit 0 contains the byte number.)
This microprogram is assigned to macro 105120. An example of
its use follow s.
120B
BMOVE EQU
FROM
IDA
CLE,ELA
IDS
DEPINE BYTE MOVE MACBC
GET SOURCE ADDRESS
CREATE BYTE ADDRESS
GET DESTINA~ION ADDRESS
eREA~E BYTE ADDRESS
f!OVE THE BYTES
ADDRESS OF AMOUNT TO !DVE
TO
CLE,ELB
BMOVE
BAl!
DEl
NINE
CCT
0
•
•
TO
DEF
Ase
DEF
5,A1B2CJD4ES
*+1
ESS
5
NIN E
DEC
9
FROM
*+1
Follo~ing
the acove execution, the characters "A1B2C3D4E" vill
have been moved. The byte fcllowing the E in the destination area
will net h~v~ been modified.
2-79
0:.
1'~n21!!~2
This microprogram performs -a translation of a string of
characters according to a translate table.
If Y is the byte
address of the translate table and X is a character (8 bits) to be
translated, th~n:
x (-- character
at location
~+X
The A regist~~ Frovides the word address of the translate table,
vhile B suppli€s the byte addr9ss of the strinq to be translated.
An inline parameter provides a positive -count of the number of
characters to h~ translated. The microprogram is interruptable.
Hence, the inline count is volatile and may be modified. A and B
are modified.
~he
micrcprcgram is assigned to macro 10S1f.O. An example of
its use follows.
TRstT lQU
IDA
DEFINE ~RANSLATE MACae
LOAD- TRANSLATE TABLE ADDRESS
LOAC ADDRESS OF STRING
!AKE IT A BYTE ADDRESS
TRANSLATE THE STRING
AMOUNT TO TRANSLATE
160B
I!IAPAD
LOB
SAD
CLE,ELB
RAM
TRSLT
eRC
5..
•
•
MAPAD DEF
ASC
SAD
DEF
Ase
*-101B
5,1234567890
*+,
3,AIEECG
Following the atove execution, the characters "AIEBCG" will have
been Ieplac~d by the characters "19523G".
In~i!~£1 Asg£~~~
!his
li!l
microprogram generates a list of indirect address
useful- In accessing unique storage areas.
Such a
technique has been used in the programming of serially reuseable
modules to access individual control blocks.
The address in
register A is d~posited into the location addressed by an in11ne
address list pointer. A is then incremented as is the location
pointer, and the process is repeated fo~ a spe~ified number of
Fointers. The B register is left untoucheu. A will be updated by
the number of pcinters gen9rated.
.
The microprcgram is ~ssigned to macro 105000. ~n example of
its use follows:
pointe~s
2-80
IlL
EQU
LOA
BAM
DEP
DEC
•
•
ILIST DEF
A
PTR S
ESS
ESS
0008
ILIST
DEFINE IAL MACRO
LOAD ADDRESS OF STORAGE AB!A
GENERATE ADDRESS LIST
ADDRESS OF .ADDRESS LIS~1
NU"BER OP POINTERS
IAL
PTRS
3
A
J
3
Pollowing axecution of the above example, PTns vill contain values
equivalent to:
DEF
DEp·
tEF
A
A.1
1+2
This microprogram is used to simultaneously execute an 1/0
instruction and mark the occurance of this execation.
This is
done by using a m&cro followed by the desired IIO instruction and
a flag word which -will b4 set non-zero by ~he microprograa.
IIO
instructions are limited to those not involving A or B.
The microprogram is assigned to macro 105221. An example of
its use follows:
PFn 10 EQU
RAM
STC
OCT
221B
DEFINE
PFRIO
EXECU~E
MACRO
STC AND FLAG SAftE
THE
108
o
FLAG WORD
Following execution of this example, th~ control bit of the
selected interface will have been set (normal STC), and the OC~ 0
will have b~en changed to a one •
.fg}!.~;:
iAil
~lil
this microprogram allows a module to exit from a subroutine
and simultaneously clear the subroutine entry point location.
This is especially useful in interrupt handler,s to allow for the
simple inspection of the value of the interrupt entry point in
order to d7termine if an interrupt is active. This is a necessary
decisicn for power recovery ~rocessing.
.
The microprogram is assigned to macro 105223. An ezample of
its use follows:
2-~1
PPREX EQU
BAM
I:EF
223B
PFREX
I.10
DE.FINE THE MACRO
EXI1 THROUGH 1.10
contrel is transferred to 1.10 indirectly just as in a J~P I.l0,I.
However, in addition, the l.10 location will b& cl~ared.
This microprogram incorporates the actions of Fov~r fail I/O
and pcwer f~il exit. That is, an I/O instruction is ~xecutea and
flagged, ~nd an indir~ct exit is made with the entry pcint being
claar€d.
The microprcgram is assigned to macro 105222. An Example of
its use follows:
~TF
2228
PFREI
OB
DEF
1.10
PFREI EQU
FAM
ceT
DEFINE THE MACRO
EXECUTE THE MACRO
o
~he
stF instruction is ~xecuted and the inline OCT 0 flag is set
non-zero. Control is given to the location whcse address is in
location I.10. I.l0 is cl~ared.
III.
Design Structures
Some of the efficiency cf the microprograms is due to th~
design assumption that the wcs module is module one.
It is
therefore the macro "entry" wodule.
This can ·eliminate some
wasted microproc~ssor cycles for jump tables.
In t.he r~mainder of this section, each of th~ individual
micro~rogr~ms is discussed in detail.
microFroqrams will use the F register. as a stack
This has two impacts. First, memory protection can not
since the +wc uses of the F register would conflict.
Second, no oth~r microprograms
may
use
th~
F
register
indiscrimi~antly.
This use of the F register is justified on th~
basis of efficiency. Memory protection does not appear to be a
future requirement, and other micrcprograms do not seem to be
heavily restricted in not using F.
It should be noted that the
these
~ointer.
be us~d
2-82
tasic instructicn set never modifies F. Should this use of P
become a problem, other forms of save and restore can be
implemented. '. However, all other forms will suffer an increase in
execution time OVEr the current design •
.§U.@
".i.9!st~£!.
The save mictoprogram de~ends on the use of a macro having
bit 1 set and bit 0 clear (105xx2 or 10Sxx6). This is because the
IR is us~d to develop the saved value of the 0 register. ,since
saving of the registers requires three co~e writ6s (one for A~ one
for B, and one for E and 0), it is desireable to have the
micrc~rogram initiate the first write as
soon as possible.
By
assigning the macro 105362 to this microprogram, the primary jump
table can be a voided. There ~':..:, ~~ iI the first microinstruction for
this microprogram can initiate the first core write and does not
ha va to be a, J MJ? microinstruction.
The
microprogram thus fully
.e~ecutes in the minimum number of storage cycle times.
While the ~o~e writes for A and B register values are
occu~inq, the values of E and,O must be developed.
This is done
using the eNTR. Bit 1 of the CNTB is set if 0 ,is clear by using
bit 1 of th~ IR as a constant (hence th~ requirement for 10Sxx2 or
105xx6). Also, if E is set, bit" 0 of the CNTR is sst. H~nce, the
net ~esult of this macro is as follows:
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
A is writ ten to the location addressed
F is incremented.
by P.
CNTR is
eNT B (')
cleared.
(Thus, CNT'R (1) saves the
is set if 0 is clear.
complement of o. )
B is written to the location addressed by P.
E is transferred to FLG.
F. is incremented.
CNTB(O) is set if E is set.
CNTR value is written to the location addressed by F.
E is restored from PLG.
F is incremented.
E~~2I~ ~~i~~~§
This microprogram performs
the save r~gisters microprag.ram.
1.
2.
3.
4.
nearly the inversE opEration of
F is decremented.
A core read for E and 0 is started.
'0 i's assumed set.
FLG is set. with bit zero from the data read from core.
(Th is is the sa ved va lue of E.)
9.
10.
11.
12.
P is decremented.
A core read for B is started.
E is leaded from FLG.
0
is cleared 1f bit one cf th~ data from (2) is set.
(This is th~ complement of the saved value of 0.)
B is leaded from the data read from cor~.
F is dEcrem~nted.
A core read for A is started.
A is leaded from. the data read from core.
1.
F is transferred to A.
5.
6.
7.
8.
12!.S
&I!~
tnis microprogram must initially have a default NOP in the
IR. Therefore, IR is cleared by the JMP in the primary jum~ t~ble
This microprogram is also used as a subroutine by scme other
microprograms. In this case, the JSB clears the IR.
1.
2.
3.
ij.
S.
6.
7.
A 32 bit logical right shift of B and A places "B(15-1)
in S1 (1U-0)
an,j B (0) in A(15).
(Address of word
contai~ing byte in S1 and byte number in A(15).)
A rea~ of the word addressed by S1 is started.
If A(15)' is clear, an ALF instruction is built in the
IR.
The data read is plac~d in Q as operated on by either
two NOP's or two ALEfs.
(Thus th~ desire1 byte is
plac~d in Q(7-0).)
B is incremente~.
Q is transferred to A with A(15-8) cleared.
The microprogram ~ither r€turns to tyte move or exits
phase three.
~!2I~ J2.I~
Ihis microprogram must initially have a default NOP in the
IR. Therefore, th~ IR is cleared by the JMP in the primary jump
table.
This microprogram is also us~d as a subroutine by some
other Dicroprograms. In this case, th~ JSB clears the IR.
1.
2.
3~
B (15-1) are shifted to S1 (14-0).
FLG is set with 8(0).
(Address of word containing byte to S1 and byte number
to FLG.)
~ read of the word addressed by 51 is started.
B is incremented."
2-84
LI.
s.
6.·
7.
8.
9.
10.
If PLG is clear, an ALP instruction is built in the IR.
The data read is placed in Q as opera.ted on ty either
two NOE's or tvo ALP·s.
(Thus the byte to be.,saved 'is
mOVEd to 0(15-8).)
.
Q (7-0) are cleared and Q 1s 1Ioved to 52.
·
1·(7-0) and 52(15-8) are .merged and 'positioned either
with two NOP's or two ALP's.
A core vrit~'is initiated.
The merged valu~ is' written to core.
The microprogram. either returns to byt~ move or e%its
phase
t~ree.
En.gJJ!!
1.
2.
3.
LI.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
1.
2.
The address of the h;-=,t,i pointer is placed in 52.
The CNTR is set from the IR for use in detectinq the
priority enque request.
The new element link word address is placed in 53. If
the request is not priority, S2 is changed to the ·tail
pointet.
A read of the appropriate ~ointer is $tart~d using 52.
The tail pointer address is developed in 51.
Q receives th~ old element address just read.
S4
receives the proper 'link word· content for the new
element.
The carry flip/flop is set if the request is priority
and the head vas clear.
A core write of the head or tail pOinter is started.
~he
contents of B are written into the pointer. (Tail
or head now addresses new element.)
If the reques~ is not priority, then 51 is changed to
rewrit. the old element link rather than the tail.
The link word of the new element is written fIom SLI.
If a priority engue and the list was not empty, the
remainder of the micrcprogram is a NOP.
a is written into the core location addressed by 51.
(Old element now ~cints to new tail alement or for
priority with an e~pty list, the tail points to the new
ale men t. )
The
carry flop is set for non-priority r~quests to
refl~ct the emptiness of the list.
The head pointer is read into E.
If a.is clear, an exit is made.
The list is empty.)
2-85
(P
is not
increment~d.
3.
The
4.
'5.
6.
[»
(The list is not empty .. )
The link word value just read is placed in 54.
The head is r~written with the value in 54.
(Read
point~r now addresses new hea~ element.)
If the head Fointer is going to zero, the tail pointer
is rewritten to address itself.
7.
These
together.
1.
2.
3.
4.
link vord of
S' isandincramented..
is rea d •
microFrograms
are
the degueued element is
very
simil~r
d~velcped
in
and vill be described
Bits 4-0 of the instructicn register represent a signed
index to be added to B. Due to the function of the AOR
S-bus micro-order, bits 9-0 are added to B first. The
result goes to Q. If X repres~nts bits 9-0 of the
instruction register with bits 4-0 clear, then this
step produces: Q=B+X+N where N is the desired index. '
X must be removed. two subtraction st~ps nov occur to
=emove X from Q. The final result (B+N)
goes to 52.
The value X is based on the macro assignment for the
microprograVls.
For load, a core read is star~ed to the address in S2.
For' stcre, a write is started.
A is appropriately loaded from or stored to the memory
location in ques~ion.
the eRe corputation is a division of a message by an error
detecting polynomial. The remainder of the division is the CRC
result.
ijy
beginning with a clear CRe result and applying each
successive bit of ~he message to the division process, the CRe
result may be computed. This microprogram handl~s a character of
th~ messag9 and applies each
of the 8 bits of the character
successiv~ly.
The polynomial involved hera is:
XI6+X15+X2+1
This is ~he standard eRe poltnomial fqr IB~ binary synchronous
communications.
In these ccmlunications, the cae result is
maintained with i~s low order bits in high. order positions of the
computer m~mory werd. The division is carri~d out with 1 bit
shifts and modulo 2 addition (an exclusive or).
2-86
Por more details on the subject cf err~r detacting codes and
on the technique used by this microprogram, refer to the following
publication:
Jalles l!artin,
p~entice-Hall~
I~~.2£.!§§iD.g l!!.1.!~n 2~nJ.lati.9a,
Inc., Euglevood Cliffs~ New Jersey,
1910, ·pages 76-95.
(especially .pages 95 and 91-93)
1.
2.
l~
q.
5.
6.
7.
8.
9.
10.
11.
in
A and B are saved
S4 and Q respectlv~ly.
is set for an 8 cycle loop using a constant value
of 10 ~ctal) from the lB.
(Hence, the requirement for
a macre assignm~nt of 105150.)
A constant (polynomial) and an RIB instruction are
built •.
The supplied charac~~7 is moved from A to B.
The
current eRC result (addressed by P) is read and
rotated right into 52. A is cleared.
B and A shift right together. B(O) becomes 1(15). 52
is then exclusive ·cr'ed with A.
This applies the
constant (or 1) part of the polynomial. Result goes to
A.
If 'thE rasult of 7 is a ", in A(1"5), then the reaainder
of the polynomial 1s· applied.
52 is set with the new rotated value of 1.
CNTR will cause cycling on steps 7 through 9 for each
of the 8 bits in B. A is cleared on JMP's to step 7.
The CRe result is ~evritten to cora.
P is incremented. A and B are restored.
CNTR
Normal processing
1.
2.
3.
q.
5.·
6.
7.
The count addressed by the inline parameter is read and
the result is loaded into Q (-count-1). If the result
is not a positive value, the microprogram exits a~ step
10.
The' destination address in e is moved to 52.
A source word is read as addressed by A.
A and E are incremented.
53 (or Sq if used in ccnt~ol store module 0 or 2)
receiVES the scurce word content.
The count is decremant~d in Q. When zero a skip occurs
to an Exiting JMP to step 10.
The destination word write is started using the address
in 52.
2-"S'k.
""~\
8.
The source
tin~ticn.
q.
10.
in 53 (or 54) is written to the d~s
If an interrupt is p~nding, procged at step
cont~nt
11.
B is transferr~d to 52 as t.he new source address. The
miQroprogram continues ~t step 3.
P is increment~d past the in1ine param~ters and en1 of
pha s e is set.
Int~rrupt
11.
12.
processing
The ccunt in Q is d~crement~d, and the microprogram
continues at st~p 10 if the count goss to zero.
If
mor4~
movin9 is required, t.h~ current count is
rewritten to th~ location ad1ressed by P and P is
decremented to cause the macro to bp. re-eX9clltl9d.
!his microprogram uses the load and
as su1:routines.
stor~
byte microprograms
Normal processing
1•
The
count
.microprogr~m
acquisition
is llsed as a
code
in the
su t:rollt. ir.e to
mov~
o1:+.ain
words
t.he
COU!l
Time in seconds <7:0>
s ub type 4C 7: 0 >
Time in seconds <7:0>
Fun ction (6: C>
String length <7:0>
Port< 12: 8>
~icro-coR.and <5:0>
Micro-command <5:0>
lJmai2n
-Notes
,
2
Ngt@s
Micro-micro-cemmand
User is runlinq
User 'is not running
Input wait
Hang user u~
User l09g€~d cr.
Echo on
Echo off
Tape mode all
Start tim€d retry (ASCII files)
3-10
3
12
13
Nev user called
Kill terminal output
Allow input
output wait
l:s buffer available
Allocate de.ice (ASCII files)
R~lease device (ASCII files)
Allocate output buffer (ASCII files)
Transfer in~ut buffer (ASCII files)
Backspace
Kill device output (ASCII files)
F et ch next cha racte r
RJE command
User aborted
Process input string
(Reserved fer future use)
Send core i.age
Release buffer
(Reserved fer future use)
Save buffer pointer
Restore buffe~ pointer
Console buffer eapty
NUC
KTO
'415
ALI
OiT
IBA
16
17
20
ROV
2·'
ALB
ADV
22
23
24
25
BKS
'KDO
,PNC
26
RJE
21
30
31
lBT
X'RB
PIS
NOP
SCl:
RLB
NOP
SBP
RBP
32
33
34
35
36
37
CBE
00
01
WTP
What tar.inal type
SBL
Send buffer length.
~tes
1.
PCP
the
is
an
follo~ing
ASCII files related co ••and.
responses to the SP:
PCP returns ODe of
o-
command accepted
1 - device not ready
2 - illegal data input fro. device
3 - hardware read error OD device
" - unrecoverable device error
-1 - no buffer available
-2 - device end of file
-3 - no data available frcm device
In the non-zero cases, the response is simply an echo of the
current, dEvice status.
2.
POS responds to the SP as follows:
3-11~
"6
5
7
8
9
10
o-
command accepted
-1 - no buffer available
3.
The _ following aicro-micre-coded commands are defined bY,bits
9:7 of the command:
o
INI Initialize lOP
1 KSB Col d dump
2 SNP Send number of potts
3 SDT Send device table
4 SSD System shutdown
For the INI command, the fclloving SP
o-
r~sponse
is given:
RJE is present in system
1 - RJE is not present in system
other commands yield obvicus respcnses.
4.
IEl responds to the SP as fellows:
o-1 -
5.
buffer is available
no' tuffer available
AOY is a two word command. The sacond word receivEd fro. the
contains the buffer length to be associated with the
device baing allocated.
SP
6.
ROY
responds to the
SP
as follows:
o - device was released
-1 - device is still bUEY
7.
ALB is a tvo word co~mand. The second word receivEd fro. the
SP contains the buffer length to be allocated.
ALB then
responds the SP as follcws:
o~O
8.
IRa responds to the SP as fellows:
o-
~O
9.
buffer was allocated
- same as PC, (see ncte 1)
buffer available
- same as PCF (see ncte 1)
RJE responds to the SP as follows:
O. - buffer available
3-12
-1 - no buffer available
10.
SCI is a tvo word com.and.
The second word receiv~d frca the
SP contains the start address for the area of the ICP to be
returned to the SP.
3-1~
The interconnect kit handler (IeKH) manages comllunications
between the system processor (SP) and the I/O processor (lOP) at
the user prograa level.
Those communications consist of the
dialogue between a separate handler,
managing
time
share
terainala, and the system processor. By definition the inter'connect
kit
has
characte~istics
which
require
special
consideration.
1.
Although the interconnect kit is a single physical
device, it must SUp~OIt 32 separate· and independent
data streams (onE' for each potential user of tbe tiaeshaz:e system).
2.
The identity of these . separate data streams must be
aaintained in its interactions with ether handlers as
vell as with .IOC.
3.
Each of the data streams 1s bidirectional, used for
aeslages froll the SP to the external handler and for
messages fro. the e~ternal handler to the SP.
4.
For reasons of performance the ICKH and the handlel;s
with which it interacts vi1l not utilize the dynaaic
baffering facilities offered by the buffer aanager.
5.
The systell processcr "controls" each data strea.. The
nature of communication is that every input tc the SP
evnkes ~ response in the f~rm of a co •• and or output.
r
The illpact
outlined below:
of
these characteristics on the ICKH handler is
1.
control and status information must be maintained for'
individual data streams (see Local data structures
below) •
2.
stream identIfication is embedde-d in all coa.unications
vith external routines. The necessary infor.atien ~s
maintained in the control words attached to each
buffer.
3.
since
information"
flow
between
handlers
is
bidirectional, contrel information in the fora of a
3-14
co.mand code and status
every buffer queuEd.
4.
'5.
inforaation
is attached to
Buffers are managEd by the IeKH. All data buffers used
are dedicate4,to the handler. The leKS queues .apty
butfers for other ha,ndlers to fill; or, alternatively,
queues full ones as output to another ,handler and
receives thea badk as vork in its own queue. !his is in,
lieu of the dynamic facilities of the buffer •• nager.
Buffering and processing techniques are dictated by the
its refponses t,o inputs it receives.
These
are co.municated to the handler through co.plated event
notifications.
Sp through
1 data strea. can be in one of three operating states.
states and buffering techniques associated with each are:
The
1.
Co~ yersation
state
all data received ~ another
handler and trans8itted to the SP is, single buffered.
Every
trans.isslOD
19 the SP is followed by a
trans.iesion !lSI the SP. If a transaission ~ the
SP is terainated with an indication of aore output to
follow, double buffering is used.
Outputs "ter.inated
with a transmit co.plete indication cause input fro.
the other handler tc be enabled.
2.
Runninq state - input fro. the other handler is enabled
only at the direction of the SP and is sinqle buffered.
outputs fro. the SP to the other handler are double
buffered under the sa.e conditions as conversation
state.
outputs terainated with a transmit co.plete
indication cause input fro. the SP to be enabled.
3.
Tape
state - input fro. the other handler to the SP is
'there is no output to the other
handler in tape state.
doutle-tuffered.
state transitions occur at the direction of the Sf either
through an explicit co •• and or iaplicitly' due to an unexpected
occurrance.
"-
3-15
~R.!~.Dls ~l!D.¥ll2!l!
Iaplicit to this discussion is the understanding that each
data streaa is independent of all others. processing require.ents
are
determinEd by the ·state" of the stream as described
previously. The "initial" Ot native state of each data streaa is
can versation.
state transitions occur because of an explicit
directive fro. the SP or due to the occurence of a'n unexpected
event. The valid state transitions and causes are:
1.
conversation to running - occurs when the SP indicates
UIB (user is running)
2.
conversation to tape - occurs when the SP indicates TPO
(tape mode)
3.
running to conveIsation - occurs when the SP indicates
OIB (user not runting) or ABR (user aborted)
4.
tape to conversation - occurs on the first data output
fro. the SP.
5.
tapE to running - occurs when SP indicates UIR (user is
running) •
Because of performance considerations relatiYe to the SP
software and bEcause the IeKB (and the IOP) .are in effect ~i,'en
by the SP, the sequence of operations is normally a WRITE to the
SP i •• edia'telr followed by a BEID ter.ina ti ng vi th output fro. the
SP
and/or
an indicaticn cf action to be perfora.d.
The
indicators, as documented in Ease Design Specifications of the
Inter-connect Kit Driver are:
1.
Buffer full (8FL) - the SP has data to sond
2.
start ENTER tiaing (ENT) frow the tar.inal
3.
Allow !Ol input (ALI) - the SP requests an unti.ed read
from the terminal
4.
SP Input Killdd
(SIK) - all output operations to the
• ux should be pur ged and an input is requested.
5.
User running (Uli) - directs a state transition fro.
conversation or tape.to running
3-16
th~
SP requests atia.d read
6.
User net running (ONR) - directs a state transition
fro. running to ccnversation
7.
Tape mode on (tftO) - directs a state transition fro.
conversation to taFe
8.
User aborted (lEB) - directs a state transition from
running to conversation
9.
no indicators on at the ter.ination of a RElD or WRITE
is a valid return su~jectto state dependent processing
Unsolicited events can occur to direct:
1.
Buffer Pull (BFL) - indicates SP output pending
2.
SP Input Killed
terminal output
3.
User Itorted (IEB) ~directsa state transition fro.
running to conversatien
4.
Hang user up
disconnected
5.
User logged
logged on
6.
Nev user called (IDC) - the SP indicates a nev user has
called
7.
system"Shutdown (SSD) - the SP is shutting down and all
terainals should te disabled.
8.
Initialization
(INI)
the
reinitialization cf the syst ••
(SIX) - indicates a request to purge
the
(BOO)
on
(OLO)
SP
requests
a
user be
the SP indicates a user has
SP
is
directing
In addition there is one 9vent which is processed as an appendage
to the ICK dri,er:
,.
Phones
(PHO)
a
~hones
received
3-i7
timing
para.eter bas been
ICKH consists of four major segments; an I/O co.plete
seq.ent, a Pri.er seg.ent, an Initialization seg.ent, and a Timer
segment.
Each of these is cutlined in soae detail below and in
the acco.pan1~nq flow charts.
The initialization segaent (ICKHI) is entered
startup time (i.e., IOP load). processing consists of:
1.
initializing all SIE indicators
2.
acquire and
han dlers.
3.
exit to the calling routine
stote
at system
identification for the IC! and
~ux
The initialization segment is reentered at srste. IIIT ti.e
(i.e., SP startup) and the pxccessing ~roceeds as follows:
2.
purge the queues for the ICK and "UX handlers
issue a Clear call to the interconnect driver.
3.
eapty the ICK quaee
4.
purge all TQE's aJJd set stream status word to zero.
S.
queue an ENABLE oteration on each data streaa.
6.
exit to the
1.
calli~9
and'm~ke
buffers availablE.
routine.
is
The Priaer entry (ICKHP)
handler has queued vork for the
follows:
.
activated whenever another
Processing proceeds as
ICKH.
1.
obtain gueue
2.
locate proper SIB
3.
branch to appropriate processing state routine
Conve~sation
state
e~trJ
processin~
frcm queue manager
(peON)
type and process accordingly
1.
determine gueue
2.
issue WRITE/READ call to the ICK
Ter.inal input
status
as
dri ver and exi.t. _. All writes contain
co •• unia ted by the mux handler. If 'the line connect
flag in Bewa is set, start LOGON ti Iling.
e~t~J
3-18
3.
Empty buffer retuIn (NOP) - mark buffer as available if
flags W=I=O=P=C=D=C.
Otherwise use the tuffer as
. dirEcted by those flgas and exit.
4.
Control (break or line drop) - issue a WRITE CCRTROL to
the ICI driver vitq the appropriate indicator set and
exit.
5.
Control (line ccnnect) - queue READ through the. queue
manager, queue tiwer element, L=1, exit.
Running state
~rocessing
(PRUI)
1.
determine queue entxy type and process accordingly.
2.
terminal input - if ENTER timing is in progress, purge
the TOE and insert tise in BCi9.
Always
issue.
WRITE/READ call to ICK driver, then exit. III writes.
contain status as cc ••unicated by the aux handler.'
3.
empty buffer return (HOP)' - sa.e as conversation state
with the follwoing exceptions. If W=1, queue a zero
length write to PoOIH with Bit 15, BCW1 set to 1, clear
Wand exit. If BCW' Bit15=1, start ENTER state.ent
tiaing, queue a READ to the ter.inal, and exit.
4.
Control (break or line drop) - issue a WRITE CONTROL to
the ICK driver with the appropriate indicator set, then
exit.
Tape state processing (PTAP)
1.
2.
All work queued is input fro. the ter.inal. Issue a
WRIlE/BEAD to the ICK driver, then exit.
III writes
contain status as cc •• unicated by the mux handler.
or
CONTROL
(lite
dro~
issue
indicating user bung up and exit.
The exit procedure for ICKHP is a J!P .COM.
3-1~
a
WRIT!
COBTROL
The 1/0 co.~lete s9qlent (ICKHC) is activated by ccapleted
event notifications for the ICK.
ICKBC processing is state
sensitive and proceeds as follows:
1.
obtain I/O complete entry
2.
locate appropriate SIB
3.
observe
state change indicators, change state
necessary and bratch to processing. state routine.
if
Conversation state processing (CCON)
1.
determine event type and process as follows
2.
SP Output
if. character count is non-zero, qtteue
output as WRITE through queue .anagar, else free
buffer. ·Then,
a.
If BPL=1, issue a BEAD to the leI d~iver if a
buffeI;' is available else set 0=1. Exit.
b.
If ALI=1 cr ALI=BFL=SIK=O, queue a buffer with
RElD requeste~ through the queue a.nager if a
buffer is available, else set 1=1. Exit.
c.
If SIK=1, queue ,an available buffer with CClfTBOLPORGE requested and set I=1.
If no tuffer is
available set P=1. Exit.
3.
Initialize (INI)
4.
Hang user up (8UU=')
queue a buffer with control
disable. Queue a timer element with.1 sec interval,
set U=L-E=O, and Exit
5_
Dser logged on (ULO=')
set L=O,O= 1, if T-1 purge
the ti.er queue element and exit.
6.
Hev
user called (NUC)
set' L::1,U=1,
ale.ent with interval=PHONE, and exit.
7.
System Shutdown (SSD)
disable tiaer routine, I/O
co.plete segment, and all data streaas.
Reset to
native state with no op~rations pending_
Running state
1.
~rocessing
- jump to system restart routine
(CRON)
Determine event type and process accordingly
3-20
queue tiaer
2.
SP Output
if character count is non~zerc, queue
output as WRITE through queue aanager, else free the
buffer and then~
a.
If 8PL=1, or
ALI=BPL=SIK=EIIT=O, issu.e a
·R EAD to the IC K dri ve r if a
tu·ffer is
available, else set 0=1. Exit.
b. .
ALl a 1, queue a
RE.ID through the queue
aanaqei if a buffer is available, else set
1=1. Exit.
c.
SIK=1, queue a CORTROL-PURGE througb the
queue manager if a buffer is available and
set 1=1. Else set P=1. Exit.
d.
3.
ENT=1, set E=1 queue zero length WRITE to
terminal and save ti.e parameter.
If no
buffer is available for writing set Va 1 and
exit.
Hang User UP (HOU) - queue a DISABLE requ.st, set a
timer with a one seccnd expiration, and set O=E=L=S=O.
Tape state processing (CTAP)
Th~
1.
deter.ine entry type
2.
must be 1LI=1, queue READ throuqh queue aanager, 1=1,
exit. If ALI=O, then return to Conversation state.
exit procedure for ICKHC is a J"P .CO!.
PROCESSING
IO
STATE
COMPLETE
INDICATORS
BlL
BUNNING
UNSOL
READ
COMVEBSATICN
BEAD UNSOI
X
X
EST
ALI
SIlt
UIR
UNR
'rP!O
X
X
I
*
*
ABB
BUO
OLO
HUC
RLB
(BPL=ALI=SIK=O)
INI
SSD
X
X
'x
X
1
'I
X
X
•
*
X
X
X
X
X
I
X
][
occurence possible
*
I!PlkES STATE TBliSITION
3-22
,.
•
*
TAPE
BEAD
•
x
•
UNSOL
*
The timer sEgment
(ICKHT) is used as a subroutine by the
other segments and th~ TBG handler. There are three parts:
Cr9ate tlmar queue,element (15tR)
1.
qet TOE address ftoa A-reg
2.
set T=1 in SIB
3.
JSB to timer enque routine
4.
J"P TSTR, I
Purge timer queue element
(T ERG)
1.
get TQE address flO. A-reg
2.
J'SS to timer dequeue routine
3.
set T=O
4.
J!P TPRG,I
Proc~ss
timer expiration eTE JP)
1.
locate SIB, set T=O
2.
If L=1, queue a CCNTBOL-DISABLE (=) purge), exit.
3.
If
E=1, queue
an ag er. E xi t.
a
CONTROL-PURGE
through
the' queue
II
4.
If L=E=O, queue
lIanager. Exit
5.
JPlP TEXP,I
a
CONtROL-ENABLE
3-23
through the queue
Ill!".f!~~D.9.
calling Sequences:
ICKS has four entry pcints.
'.the primer en-try, ICKHP, is
entered froll the dispatcher .hen verk is queued for ICKH.
The
calling sequence is
NOP
JSB
switch locaticn
ICKBP
Exit is via:
the I/O complete entry, ICKHC, is called by the dispatcher
whenever an event completes cn the interconnect kit. The calling
sequence is:
LDl
LDB
JMP
ICKBC·
and "it exits through:
J!!P
• CO!.
1 third entry point, ICKHI, is used, only during system startup.
The calling sequence is:
JSB
ICKHI
and it e xi ts b J
.JMP
ICK HI, I
The fourth entry point, ICKHl,. is
calling sequence is:
LDl
TOE
JSB
ICKHT
TOE address
and exit is vi a
J"P
ICKBT,I
3-24
us~d
for timer servicEs.
The
Called Routines:
The
interconnect
kit bandler use·s the service-s of the queu'!
manager, buffer .anager~ allccate/deallocate .anager, and the TBG
hand-ler.
The 'haJ;ldler manages the interconnect kit tht:ough .IOC.
and the_ ICK dr iver.
Lo~§.l n~ §t'..»~i:J1IU
Associated with every data streall is a block containing
status and control inforaaticn, buffer pointers, and a tiaer queue
area.
The stream inforaaticn blocks (SIBs) are ordered by strea.
1d nu.ber (0-31) into a streal inforaation table (51!).
Each
block is 8 words long so that any SIB address can be built by the
compatation
SIBadd=SItadd+8*(stream id)
The SIB entries are defined as fellows:
woaD 1
S!lTUS INDICA!ORS
15 14 13 12 11 10 9 8 7 6 5 4 1-0
POI C D W E L Z t U R S
P -
purge flag
=1 the SP has requested all output be tilled
=0 no purge in p~ogress
o
output flag
=1 output frOB SP pending
=0 no output pending
I -
input flag
=1 the SP is waiting for input
=0 no input reqiest pending
C -
enatle flag
=1 enable operation pending
=0 no enable pending
D-
disable flag
disable operaticn pending
=0 no disable pending
=1
i-special -write flag
.1 zero length write to terminal pending
=0 no write pending
!
-
ENTER flag
ENTER statem~nt
=1
'-=0
L -
.
timing in progress
no ENTER statement timinq active
Logon flag
Phones tiling in progress
=0 no Phones tim~ng in pr6qress
-1
.3-26
Z -
disable timing flag
=1 disable timing in proqr9ss
=0 no disable tiling active
T -
timer flag
=1 timer element queued
=0 timer element net queued
o -
user activity flag
"=1 user signed on
=0 no user activE
R -
read activity
=1 read active on IeK
=0 no read active
S -
state flag
=0
conversatian state
=1
running state
=2
tape input state
WORD 2 5
~
3 2
BUfFER ACTIVITY fLAGS
1
0
B2 81
B2
buffer allocation flag
tuffer is allccated (sea 8S2)
=0 buffer 2 is available
=1
- buffer 1 allocaticn flag
same as B2 definiticn
~,
WORD 3 -
Suffer 1 Address
o
15
POINTER TO BUPFER 11
WORD
~
- Su"ffer 2 Address
o
15
POINTER TO BUFFER .2
WORDS 5-8 - System Timer Queue Element
15
S
6
0
INTERVAL IN '/1C ths OF SEC
ADDRESS OF TI~ER EXPIRATION PROCESSOR.
TI~E
3'"-27
7
8
TBG DRIVER LINK WORD
TBG DRIVER LINK woae
*ICKHT
The que-uing and contlol· ,information required by the queue
.anager, 'handlers, drivers, and .IOC. is contained in a set of
buffer control words (BCW's) appended as a pref~x to each buffer.
Descriptions are found under _"Glebal data structures." Word a and
Word 1 of this prefix are jcintly defined by the interconnect bit
and multiplexor handlers for communication of status in£o~mation.
All other USES confo,rm tc the de scriptions un'der GLOBAL DATA
S'l'RUC'IURES.
Event Status
Word 8
bit
15
14
13
12
l'
10
8
Usage
inclusive OR of bits 111-10
record received with lost da ta error
record received with parity e,rror
line connect
line disconnect
break character received
last . ct:~ration i-ndica to r
1:terminal output
O=terminal input
Buffer 'type
Word 1
Bit
1S
Usage
special zero length write to terminal or
timed read completing·
3-28
!!!ll£:t.i2n~l. ~1a~[lltio!\
The multiplexor handl~r (MUtH) manages communicaticns between
d~vices
attached to the 129201 multiplexors and
the
interconnect kit .handler. Because'of its close interel~tionship
with ICKH and 1:Ecaose .of the natur~' of the physical device it
controls, Moxa has som9 unique characteristics:
~hos@
1.
Since the 12920) multiplexor is a single physical
device which runs multiple logical
devices,
all
communication must be specific to a logical device.
Por this reason, all communications directEd to or
emanating from MUXH must contain device indentifiers.
This is true for toth IOC and Q~ traffic.
2.
The
logical
devices .attached
to
the max are
bidirectional. Hcv they are used is dictated by rCKR;
therefore, all ccmmunications between Muxa and ICKH
contain explicit directives on action~ to be performed.
3.
Each lcqical device (or data stream) is inde~endent of
every other data stream. Separate status and control
information is maintained for each.
4.
Buffering is mataged by ICKR and all buffers are
interlocked. MOXH disposes of empty buffers by' queuing
them to ICKH and is ignorant of all processing states
as defined for ICRH.
~ye!.2SlIli ~li,gjl'!
As alluded. to earlier the aux handler is coaprised of three
segments; an i~itialization !egaent called at syst.. startup~ a
Priaer section which proc;essEs vork queued for the' .ux handler 'and
an- I/O complete section which pxocesses I/O event complete
notifications.
Iliplicit tc the subsequent di,scussicn of aux
handler processing is .the understanding. tha teach Iclata streaa is
separate and ind,pendent.
The Priaer section (!DIHP) processes all work queuEd for AUX8
by other handlers. Work consists of data and/or control requests
as defined by the buffer contrel vords prefixing each qUEue entry •
.!DXHP processing proceeds as fellows:
1.
obtain queue entry from Q"
2.
establish strea. '1d and save
3.
obtain command code and process as .follc)vs:
a.
WRITE
issue
WRITE
.IOC. call to driYer, and
'9 xit.
b.
READ - issue READ • IOC. call to dri ver, and exit.
c.
CONTHOL-PURGE - issue PURGE • IOC. call to driver,
return buffer as a Nap, and exit• .
d.
CONTROL-ENABLE - configure streaa for auto-speed
detect and issue ENABLE .IOC. call to driver, and
exit.
e.
CONTROL-DISABLE
issue DISABLE .IOC. call to
driver, returD buffer as NOP, and exit.
f.
AlLOCATED fUllER -·use as directed'by the first
nen-zero en try in the Port Ta bie (PT1B) and z·ero
t he entry.
the 'I/O com~lete secticn (!UIHC) processes completed event
and unsolicited event notifications. Notifications consist of a
copy of the ICC paraaeter verd, and the queued request entry (see
GLOBAL) !UXHC ~~ocEssing is as follows:
1.
establish stream id and save
3-30
2.
if notice vas solicited go to 3; else
a.
if
line drop, acquire control buffer and queu9
event notiflcation through Q", then exit
b.
if break received, acquire control tUffer and
queue notification through OM, and exft.
c.
if unable tc cbtain a control-buffer, save event
status in P1AB and exit.
set
CftD=O, queue the
If the operatiot
buffer, and exi~
4.
Write complete - set CMD=O, queue the buffer, and exit
S.
Read complete
set CKD:l,
queue the buffer and exit
save completicn status,
6.
Enable complete -set CftD=1,
queue the buffer and exit
indicate
7.
Disatle ccaplete - set CKD=O, queue the buffer and 9xit
8.
Purge ccmFlete - set C!D=O, gueue the buffer, and exit
The
startup.
vas
purged,
3.
initialization section (801H1)
ProcEssing require.ants are:
line connect,
entered
at system
1.
obtain identificaticn for !Ul and ICK handlers.
2.
issue CLEAR .IOC. call for all data streams
3.
e xi t
callinq sequences:
an lnitiali~aticn section
an I/O co.pletE section
(MUIHC) •
"DIHP is activated by the OM whenever another handler
has queued work for !lUIH, 'it is entered from the -system dispatcher
flUIR
consists
of
thrEe
se9m~nts,
(MUIHI), a Primer section (fl DXHP), and
by
NOP
JSB
activE gate set by Oft
!!UXHP
The priaer exits by a J!P .CO!!.
MUIHe is entered from the system dispatcher for notification
of co.pleted events on .u% devices or to inform the handler of
unsolicitad occurrences on t~~ devices. The calling sequence is
LDA
LDB
J!P
IOCpcinter
buffer ~o~nter/status ,vord
MUIRe
and the completed event section exits
JftP
• CO PI.
The initialization
startup by
JSB
section
(MUIRl)
is
entered
at system
rlUXHI
and returns control via
J"P
rlUIHI,I
called ro utines:
MUXH calls ~pon
the services of .Ioe.
the queue manager (.GETQ,.PUTQ,&iSEEQ) and
3-32
•
1.2~.tl
data §ll.Y~!.Y~§
Attached to each buffer queued to MOIH is a niue vord prefix
of centrol words. These' BCa's as vell as those menticned above
are described under, "Global data structures." Word 8 of the BCls
is jointly used by the multi~lexor and interconnect kit handlers
to . communicate event status inforaation. 111 other ~ses conform
, too· t he descriptions 'under "G lobal da ta structures."
Word 8
Event status
Bit
15
14
13
12
11
10
Usage
inc In si 'Ie OR of
record received
record received
line connect
line' disconnect
break character
bits 14-10
with lost 'data error
with parity error
received
A Port Table (PTAB) is maintained with a one-vord entry for each
port configured (the entries a~e in ~Ott number order).
1 nonzero entry indicates that an allocated control buffer is expected
for that port. The content of the entry is the event status which
caused the buffer request.
3-33
I.
Functional specificatioDS
The
data interface driver provides an interface
between an HP2100 computer
and
asynchronous devicEs attachedtc the 12920& multiplexer.
for
multiplexer
inp·ut/output
The
operations
multiplexer
dri,er
vil~
handle
up
to
two· 12920A
multiplexers simultaneously 48 maximum of )2 I/O channels).
3-34
The following founctions are available thru calls tc .IOC.:
119
characters from the dESignated channel into the designated
buffer. Terllinate on CR.
91
511
j~
1.0
Bes~rved
211
the designated channel:
i.e. allow a user to dial up OD
the designated channel. Terminate
for future use.
E~R1~
when a user dials
92
Jl2
u~.
.011
w,i~e the designated nu.ber of
characters from tha designated
buffer. Terminate at end cf
buffer.
211
~gn~rc!
the operation of the
multiplexer by outputting the
given parameter word.
~l~JR1!
the d9signated channel.
Do not allow a user to dial uF
the designated channel.
No
further OFerations are allo~ed
tc the channel until an Enatle
is executed.
the current read or
write or Doth operation(s).
~~~
3-35
II.
Calling Sequences
General calling sequencEs following the for_ for, regular .IOC.
calls: .
EXT
•
•
•
.IOC.
•.Ioc.
JSB
OCT
JSB
or
function
subfunction
unit-reference
reject address
(error ret urn)
buffex address
buffe~ length in plus bytes
JftE
DEP
DEC or OCT
(normal return)
the format of vord 2 is in general:
15
·1211
function
Note:
(P'!=
~
at all tiaes)
9 8 7 6 5
subfunctioD
P V!
0
unit-reference
The queuEd versiCD cf .IOC. requires each buff.r to be
prefixed with buffer control vords. This is assuaed to
hold in the followiDg description. Also note that if
aore than one multiplexer is attached to . the co.pater
the "un~t reference" is the select code of the first
(lowest) multiplexer.
Buffer control vord
5
is
specified as follcwe for all .IOC. calls~
BITS
BITS
6 - 1
8 - 15
reserved for PURGE call.
channel number at which the c:o •• and is
directed.
3-36
!!~!1g:
JSB
• IOC.
function
subfuDction
unit reference
rejact address
(error return)
bu~fer addre'ss
buff~t length in plus bytes'
OCT
JSB
DEE
DEC
or Jt!P
or
OCT
fun,ction = P'1
subfunction = P9
unit reference = nn
where nn is the unit reference of the multiplexer.
buffer address = address of the area into which characters are
read.
buffer length = maximum numbEr of characters to be read.
Returns:
If there is no error in the calling sequence and the
read has been successfully iritiated the normal return is taken.
·If the reject address i~ taken then registers A and a contain
pertinent information.
15 14 13
A-register = a
a-register =
8 7
equiFment type
10
status
d---------------ZERO------------------C
See the status IOC call for registEr A definations.
d=1
c=1
d=c=O
The device driver is tusy .
A OMA channel is not available
The function or subfunc~ion is not valid for this -device
Asynchronous return: When the read operation is terminated by the
cccurance of a carriage return or some unusual condition, a
complet9d event notice is passed to .IOC., which then informs the
user l~vel program.
3-37
.aSUJ!! :
(not currently
JSB
OCT
DEP
CEe
(normal return)
function = P'1
subfunction = 19
unit reference = nn
Where nn is the
status is requested.
returned.
B~~~~nJ:
s~pported)
.IOC.
uni trefErence
fUDction
subfuDction
buffet address
1
uni~
If
teference of the .ultiplexer for wbich
nn is zero then syste. status is
Ho errors are possible.
The contents
inforaa tion.
of
the
1
and
B registers
contain
A-register=
1S 1" 13 _
87
0
a
equii.ent type status
B-register
=•
the
status
trans.iasion log
a=O: The device is available; the previotis operition is co.plete.
a=1: The device is available; the previous operation co.plate but
a transmissioD error has been detected.
a~2: The
device is not available for another request; a requested
operation is in prograss.
a=3: Previous operation vas Fu~ged.
equipment type: These six bits indicate the device type
The .alue 1s 77
3-38
bit definition
A character was received
= 1:
A character was ttansmitt~d
Bit 1";:0 :
No characters lost cn read operation
One or more chaI8cters have been lost during the read
= 1:
operatien
8i t 2=0:
No break detected during current operation'
=1: A break charactar was received
Bit 3=0:
Diagnose mode is not set
Diagnose mode is set
== 1:
Bit 4=0:
The seeking bit is not s~t
The seeking bit is set
== 1:
m=O
Transmi ss ion' leg is the positi va count at the end of the
operation.
Stat~s
Bit 0=0:
3-39
.!!l:j.:t!:
JSB
.IOC.
OCT
function
subfunction
unit reference
reject address
(error retarn)
buffe~ address
buffe~ length in plus bytes
JSB or J"F
DEP
DEC
or
OCT
function =. P'2
subfunction = 99
unit reference = nn
Where nn = 1s the unit ~eference of the a ultipl1ezer
buffer address = address of the output buffer
buffer length = the nu.ber cf characters to be transaitted to the
designated channel
Returns:
If there is no error in the calling sequence and the'
operation has been successfully initiated (queued'IOC) the nor.al
return is taken. If an errcr is detected in the calling sequence
or the operatien can't be initiated the reject exit ;Ls taken.
Asynchronous return: When the write operation is co.plete (buffer
or purged by the user .IOC. notifies the user level progra.
by an entry in the completed event queue.
~.pty)
NOTE:
If a read com.and is active when a wri te co ••and is passed
to the driver, th~ read is purged before the write is initiated.
3-40
iMR1!
-
JSB
.IOC.
OCT
JSB
or
Jft P
DEl
or OCT
(normal return)
DEC
function subfunction unit reference
reject address (error return)
buffer address
" (co nstant 1)
function = 01
subfunction = 20
unit r6ference = nn
Where nn is the unit reference of the multiplexer.
bu~fer address = address of a ote word buffer
Returns:
If there is no error in the calling segu9nce ~nd the
qpe;ation has been successfully initiated the normal exit is
\~~9~~
Other~ise the reject exit is taken.
Return:
Tha enabl~ is posted complete ,hen a
is established for the requested channel~
the driver
connection is Es~ablished when either of t~o cond~t~ons
l§J~~~ro~oQs
oo~~ect~on
~$s~mes
~~
~
,et:
1~
~.
Data set ready is asserted by the data communicat!ons
eq u ip lIent.
A
carriage return is received frem the data te~.inal
egu 1 plDe Ilt,.
of the above conditions causes an outstanding enable
operation to be completed.
Conditicn one (1) allcvs proper
ope;~tion
over dialup or dEdicated lines with modems. Condition
two (2) allows operation with hardwired (thre~ wire) lines.
E~ther
~O~B:
Be sure that all current operations are co~plEt' before
issuing the enable. It is best to precede tha enable by a disable
or purgl! operation. The cUIrent driver impl~mentation 'Furges ~ll
oparations before processing the enable requ~st.
Further note
taat n~~ all S~,!1a~l! jjll ~~~5~! 2~ ~~ !i~! (send,
receive, signal grcun~) £i~£ui~ without special ju.p~rs attached
to the connector at the data terminal end; soma termin~ls require
the presence of data set ready, and/or claar ,to send and/or
carrier detect.
'
3-41
£.2Jl's • .91:
JSB
.IOC.
function
subfuDction
reject address
buffer address
1
(constant 1)
OCT
JSB or ..1ft ~
DEP
DEC or oc~
(normal return)
function
uni t reference
= Jf2·
:: 29
unit reference = nn
Where nn is the unit
sub£ unction
Returns:
refe~ence
of the multiplexer.
Like the write call.
operation:
The parameter word
ou~put to the designated channel.
at
the given buffer address 1s
Parameter vord definition:
Bi t 15 -= 1 II us t be set toone
Bit 14 == 0 output paraleters to receive channel.
If Bit 14 = 0, then the following definitions hold:
Bit 13 = 0 disable receive" interrupts
Bit 13 = 1 enable receive interrupts
Bit 12 = 0 .do not Echo received characters.
Bit 12 = 1 Echo teceived characters
Bit 11 = 0 disable diagnose logic
Bit 11 = 1 enable diagnose logic
Bit 14 = 1
If Sit
Bit 13
Bit 13
Bit 12
Bit 12
Bit 11
Bit 11
·Regardless
of
=
1 ,~ then
the following definitions held:
disable trans.it interrupts
enable trans.it interrupts
0
= generate even parity for 8 bit ASCII
= 1 generatE odd parity for 8 bi t ASCII
= 0 ·disable diagnose loqic
enablE diag~ose loqic
=
14
= 0
= 1
,
the
sett.ing
cf
bit 14 the following definitions
hold:
Bits 8-10
Bits 0-'7
(character length - 5) !OD(12)
( , " , 400 IBa u d ra te) - 1
For a control function tte channel number (Bits 8-15 of Buffer
prefix word 5) have a special meaning.
3-42
Bit 13 = 1
Bit 14
C
Bi t 14 = 1
=
d"iagnost1c channel configuration
first IIlUX
second- mux
3-43
]in!!.!!:
JSB
OCT
JSB
DEP
or
JltP
or OCT
(normal return)
DEC
.IOC.
function
subfunction
reject address
buffer address
, (co tstant ,-)
unit refErence
function = 92 _
subfunction 1: 3,
unit reference = nn
Where nn is the unit refeIenc~ of the multiplexer.
buffer address 1: address of a CDe word buffer.
Returns:
If there is no error in the calling sequence and the
operation has been successfully completed the nor.al exit is
taken. Otherwise the reject exit is taken •.
NOTE:
Disable
vill purge all outstanding read and write
op9rations before being initiated. The data set control interface
~or
the requested multiplexer channel is set to cause a "ring
forever" condition; this can only be cleared by an· enable being
issued to the same multipleXEr channel~
3-44
.fll..g!!:
, JSB
OCT
JSB
or
JME
DEI
DEC or OCT
(J)ormal return)
• IOC.
functicn
subfunction
re'je ct address
buffet addrE'ss
1 (co nstant 1)
uni t reference
'2
function =
suhf unction = qp
unit reference = nn
Where nn is the unit referenc~of the (first) multi~lexer.
buffer address = address of a null (9 length) buffer.
Only the bufferccntrol words (1-5) 'are passed to, and used by th~
driver. The word at buffer addrass-1 contains the fcllovinq
information:
BITS:
7
o
6
0
o 1
1 ,0
1
As
usual,
op~ration
1
Reser ved
Purge current read operation
Purge current write oparation
Purge current read and write operations
b~ts 8-15 contain the channel number on which the
is tc take place.
purg~
III.
Unsolicited Event Notifications
~here
are tvo conditions which can cause an unsolicited event
d~iver
to the tase level
In both cases pertinent information is returned in A and
notice to be passed fro. the 12920 A
prog~a..
B.
The
first is a "line drop" or " connection broken" on tho TP
line.
A register
Bits 0-5 = unit reference number of the !ultiplexer
Bits 6-11 = stream idantifier (terminal number)
B register
Bits 0-15
= Zero
the second unsolicited return 1s caused by' the dEtection of
·an unusual conditicn during a data transmission.
1 register
Bi ts 0-5 unit referencE numb~r of the multipleKer
Bits 6-11
streaa identifier (terminal ·number)
B
registe.r
Bit 0=0
Bit n=1
Bit 1=0
Bit 1=1
Bit
Bit
Bit
Bit
2=0
2=1
3=0
3= 1
current opetaticn is a read
current operation is a write
no characteIslost
one
or mere characters lost
operation
no break d!tected
break detp.cted
diagnose disabled
dia gnose enab led
3-46
during
current
IV.
Dasign Overview
'l!.I..21
thE! l£2lQA mYhiRl!xe;:~i.!~
The multiplexe~ driver provid'es input, output and data
link control'facilities fer as~nchronous de~ices attached to
the 129201 multiplexer. The driver 'is modular in design and
pro'vides an interface between the 12920A hardware and Queued
.IOC.,
Tha driver is cognizant of the communicaticn line
status at all times. All lines must be enabled before any
read or write operation is issued.
When the link is
established notification is passed to the user level program.
When the operation (raad/write) is completed notification is
passed to the user level.
~gn S~'§J!l!.Ell.2ll.§
The software driver for the 12920A multiplexer assumes
the existence of the HP~OOO ACCESS I/O processor micrccede.
since the drivel is able to handle more than one
multiplexer the select codes must be assigned as follows:
first .u~ lower data select code; first mux upper data select
coda, first mux data set centrol board s~lect code, second
mux lower data select code, second' muxupper data select
code, secon~ mux data set centrol board select code.
This
restriction is imposed because there is only one equipmen~
table (EOT) regardless ef the number of multiplexers attached
to the system.
th~
driver also .assumes that thesE select
codes are consecutive •
.g.uiga §.!!llsl:.I
Althougb the multiplexer is physically a single I/O
davice f.illing three I/C slots in the 2100 CPU, logically it
must be viewed as 16 full duplex I/O channels. This implies
that the driver must maintain infotmation for each of the 16
channels attached to each maltip19xer. This infermation is
contained in Logical unit Tables (LUTts). internal to the
driver.
Each LUT is cOlposed of three sections, one for rea'}
comm~nds, one
for write commands, and one for terminal
confi~uraticn.
The structure of the LUT is outlined below
and displayed in Tabl~ 1.
Like
(0.51)
and
all Bes dIivers the mux driver has an initiator
a continuator sEction (I.51).
Th~
initiator
...
3-47
section . is responsible fer converting a requested operation
into the appropriate actions. It also queues requests for
channels which are bus} when the request is .ade. There is a
read' queue and a write queue associated with each LUT.
The
continuator section iE ~~i.arilJ an interrupt handl~r and
event co.~lete processor.
!!.I U9:2.ti1h!· ~~i2Ua.§
!R~ S!~~J~ -- The .ultiplexer driver software
contains logic to deter.ine at wh~t baud rate (speed) an
attached terminal is transmitting characters. the driver
assuaes the trans.it speed is the salle as the receive speed.
Speed detection is facilitated by the hardware feature;! of
the aultipleser interface. Each interface has 16 full duplex
input/output channels.
Each of ~he charinels is capable of
operating independently of the otherp at an} baud rate fron
about 50 to 2400 bits pEr second. In addition to the 16 .ain
channels there are 5 diag~ostic channels.
Bf setting the
diagnose bit in a aain channel receive para •• tar, the 5
diagnostic channels· can be tied to the main channel. Each of
the diagnostic channels can be configured to receive at a
baud rate different fro. the main channel and the other
diagnostic channels.' Speed detection opera tes as follc)vs.
The .ain channel is configured to receive characters at 2400
baud. The five diagnostic channels are configured to receive
at 1200, 600, 300, 150, and 110 baud respectively. The user
at his terminal st~ikes a known key (in the case of this
dtiver a carriage return which is an octal 15).
The· Ilain
channel receiving at the 2400 baud rate interrupts before any
associated diagnostic channels do. The software exaaines the
received character.
If it is a carriage return, the main
channel is operating at the correct speed (2400 baud), and
the only configuration that need be done is to tutn off the
diaguose bit in the reCEiVE channel parameter and' turn off
the speed detect bit i~ the user status vord. If a carriage
return is Dot seen at. 2400 baud, the driver exits and avnits
diagnostic channel inteJ:rupts.
Eventually, the .diagDoutic
channel configured for the same speed ·as the transaittinq
tar_inal vil1 interru~t with ·a carriaqe return as the
received character. The main channel . is then rEconfigtlred
(froa 2400 baud) to tbe rate associated with the dia9nO!~tic
channel which had the interrupt; again the speed dEtect bit
in the user status word is. turned off.
In all cases,
vhen.ever the correct speed is sensed (carriage return seE.n) ,
the "parity detection in progress" bit of the u£e~ status
word is set. This bit is used in the automatic parity
detection algorithm.
ASio.a~i~
3-48
Speed sensing for 27ql type terminals is handled in a
slightly different fashion. Since 2741 terminals operate at
134.5 baud with 6 bit characters, their carriage return
character would not te recognized using the
algorithm
described" above.
Every 2741 emits a special line control
character, called a circle C," after each carriage return.
P~rthermore,
this circle C is sean as an octal 100 when
"received at "300 baud and as an octal 174 when received at 150
baud.
Wh~n
the diagnostic channel which is configured to
receive at 300 baud (channel 18) receives an octal 100, a
specific flag ("selectric possibility" flag) is set. The
next diagnostic channal interrupt (at 150 baud) vill be an
octal 174 if the tetminal is indeed a selectric. If the
octal 114 is not receivEd at 150 baud, the "possibility" flag
is r~set.
t!Imins! ~!li!~ ~~£~ion
Automatic parity
datermination is accomplished in connection ~ith autc.atic
speed detection.
Whet s~eed is correctly deter.ined, two
things are dons. First, the "parity detaction in pro~ress"
bit is turned on in the user status word. This bit tells thg
driver that the next character to accept must be a line feed
(octal 12); all other characters are ignored. Secondly, the
parity (bit 7) of the ccrrectly received carriaqe teturn is
saved in the channel !tatus word. When the waited fer line
feed is received, its parity (bit 7) is also recorded in the
channel status word.
since carriage return and line feed
have oppcsite parity sense, the parity with which the
transmitting terminal is operating can b~ determined as shovn
in the following tabl~:
A~!Qmsi1~
Rec~ived
CR
o
o
1
1
parity of
IF
o
1
o
1
1erminal parity
Ncne - space for parity bit
Odd parity
Even parity
None - mark for parity bit
Note: An underlying assumption in both automatic speed and
parity det~ction is that ~he carriage return and line feed
are received without erIer.
If speed and/or Farity ar~
improperly determined due to an error, the user viII not be
able to correctly log en the system. In this caSE, his port
will b~ disabled and r~-enabled after the PHONES parameter
time limit has expirEd;
always less then 255 seconds.
Ther~fore, a port cannot be locked out
indefinit~ly
because
of incorrect spe~d/parity det~rmination.
3~9
11li21:
lOd..Yl!
au.ti2n!Al.E!
The aodule rela tiQnships are indicated in Figure 1.
Data and control flow axe indicated in the same fig1JJ:e.
~~he
continuator section of the ~river follows the philosophy of
the 2000F lOP multipleXEr driver q~ite clcisely; indeed, much
of the 2000P co.de for selectric p.J:ocessing remains intact •
. 3-50
FIGURE 1
r---------------------~-------------------------,
J
"
I
.IOC.
I
l
r----------------------------I
I
.J
I
I
I
I
I .
,
r-----'
I
I D.
I
~1
.BOFR
• UNS.
r------,
I
I
r-----:'·,
I
I
I
I
I
L------.J
1.5,
I
I
I
I
I
J T.51 I
I
t
L-----.-.J
L- -----.J
r--- ... ". ... _.. _.-,
lUTs
L-...... _ ... -_ ...... ,.,J
r------,
I
I
r------,
I
I P.51
I
I
I
I
J
I
A.51
I
I
L------.J
L------.J
Linas to the LUTs are intended to indicate data access cnIy.
ether lines indicate flow of centrol.
Mod ule
-0:5-;Ie51
Te51
P.s,
A.5·1
11~.h2£ 21 ~.s!Il:
• IOC. call
Interrupt ftem multiplexer channel
Interrupt flem data set control board
JSB from 0.(4 following power recovery
JSB from D.El for special SP commands
3 51
All
v.
Design Structures
Ill!
~~!l
The
.2.ni:t Ia. b1 !
logical
ulit
table
(LOT)
contains
all
the
information essential tc the operation of the dri~er.
The
LUT contents are accessed or modified by all aodules in the
driver. There is one LOT per multiplexer channel and each
LUT has a read section, a write section, and a termi.nal
configura tion section. Table 1 shows the contents cf an I,UT.
3-52
TAELE 1
LV'I CONtENTS
]~J2_~ICTXQ!i
RBPAD"
RByeT
RReNT
RSYAD
BOHED
ROEND
iBFAD
WByeT
WRCNT
WBYAD
WQHED
WQEHD
'tYPE
CDLY,LFOt!
teNT
STAT
STAT2
PPRl1
RPR!
TPRM
seNT
OCT 24
DEF DSTE, I
OCT 0,0
OCT nn
Read buffer ad~ress
Rea d bytA c cunt
Read request count
Read byta address
Read queu~ bead
R ea d que u e ta i 1
write
write
write
Write
Write
Wri te
buffet address
bytp. count
requ~st count
byte address
queue h~ad
q u"eua tai 1
T er mina 1 t Y );e
return, line feed delay
Delay counter
"
Carriag~
User status word
Port status verd
Data sP.t control bc)ard parameter
Receive channel param~ter
Transmit chann61 parameter
CR-LF delay ccunter fer selectrics
clock ticks (2 seconds) "
Exit routine for timEr ~xpira~ien
TimEr queue link and save word
Port numb~r in bits 13-10
(Bit 15 set if 2r..d multiplexgr)
20
3-53
LOT BIT DEFINITIONS
STAT 10000
1
"
10
20
40
100
200
400
40000
100000
4000
20000
2000
20000
1000
DSER STATOS WORD
User is in tape .ode
Speed detect in progless (not detected)
Control X vas entered
Reserved
Line drop timing in ~rcgress
Lina feed needed for tape mode p~ompt
special write active (/CRLF) using receive buffer
User is in Run moda
An operation is active
Input is not allow~d
Purge in progress (ic;ncre interrupts)
X-OFF was input from terminet
Parity detection is in ~rograss
Input configuration Deeded (Reserved for future use)
264X ERQ transmitted
Preceding input was ENe
STAt2 - PORT STATDS WORD
1 1 character was received/transmitted
2 A character! vas lost (input)
4 A break (input) vas detected
10 The port is in diaqncse mode
.
20 The seeking bit is set
40 A parity error (input) has occurred
100 The channel'requiras parity
200 Channel parity (odd=1, even=O)
4.00 Parity of c,rriage return
1000 Parity of line feed
10000 )
) Teletype subtype
•
100000 )
tYPE - TERMINAL TYPE PLUS CTEEFS
2 Code dEter~1ned· (EBCtIC or CALL/360)
Upper case mode
.
4
10 "CENT" character
20 "CENTC" character
40 nCR" bit (used for out~ut only)
100 control X was entered
200 Circle C SEnt
400 Circle d (Psuedo) Transmit interrupt
1000 SYNC
"
"
"
3-54
2000
4000
10000
Space
Space
Space
t.
"
"
It
".t
..
"
"
PPR! - ,PHONES PARAMETER WORO (See ERS fer definition)
BPRM - RECEIVE PARAHETER WORe (See ERS for definition)
TPRM - TRANS!IT PARAMETEE WOED (See ERS for definition)
3-*55
VI.
"ajor Functional
Module~
The aux driver consists of five major modules D.S', 1.51,
A.51, T.S1, P.~1, the initiator section, the continuator section
(d~ivEr
contrel), the appendage section, telephone linE control,
and p6wer fail/restart section.
Each
section has
specific
functions distinct from each of th~ others.
~.t..~l
. Ihi Inin at 2': ~s!.ig
The initiator section 0.51 receives control f~c •• IOC.
as a result of a user call. D.51 checks the requested devics
to see if it is operablE and the user requested operation and
user supplied parameters are valid. If these conditions ar~
satisfied, 0.51 queu6s the request for processing. Purge and
control requests are net
queued;
thet
are
executed
i.aediately.
In the event tha user r~quest can't be satisf1ed,the B
register indicates the teason:
B: 100000
B= 000000
ThE device is busy or inopgrable.
The request is not legal.
In these twc cases the A register is set to 1. If the
request
vas
successfully
initiated
(this
may
89an
successfully queued)
the A register is zero and. the B
register contents are uldefined.
The continuator section I.51 receives control wheneyer
one of the multipl~xers attached to the lOP causes an
interrupt, or it may be entere4 directly by a call from D.S1
to start an operation.
Upon rece:i'vinq control I.51 saves A, B, and Eo Next
I.51 determines whethar·the cause of the interrupt derives
from a solicited reqcest (read or write) on an unsolicited
(asynchroD.ous)
event ci.e., 'break key struck).'
If tl;le
inter~upt
is due to a read/write request a character is
appended tO/re~oved frcm thE buffer associated with the
current operaticn(s) fOl the interrupting channel. Note that
the channel nu.ber (O-'~) must be associated with the correct
multiplexer
(0 or 1) tc arrive at a user "stream number" (031). The appropriate cede and/or protocol conversions are
done on a per-charact~r basis.
3-56
Interruptions due to unsolicited events are handled in
a special way. Notification is returned to the ~ser level
via an unsolicited ett~y in th~ completed event~ queue of
.IOC.. Included in the notification is the caUSE cf the
unsolicited interrupt.
certain unsoli~ited interrupts ·are
transparent to th.e user lav'!l program. . The occurrence of any
of these special Events causes driver dependent actions to
occur. An example is the backspa~e character~
The user
level program is not informed of the receipt of a as
character; rather the current byte pointer is decremented and
normal precessing continues.
The continuator secticn is also responsible for notifying
.IOC. when operations are complete and for initiating the
next queuEd rEq~est (if a~y).
A~21
~h! lB~endag~ £2n!I~ ~~12n
The Appendage ecnt~cl section A.51 receives expli6it
control from th~ ICK dIiver via a. JSB instruction~
Th~
pu.rpose of A.51 is tc respond to certain syst911 processor
initiated requests for information which is containEd in the
LUT for. a given channEl. A.51 decodes the request, obtains
and formats the data frcm the LUT, and returns tc the leg
driver.
It
is desirable to ·make this code
indap9ndent of the mux driver as possible.
1",2.1
I~ lli.5£2R!.!!!Y!l.l~a1is.n.§
11112
as
logically
~.2ll~ ~~ion
The Telecommunications line control sectien T.51 is
responsibl$ fer monitoring the status of user connections
(phone lines or hardwited) to the lOP. When a change in any
line stat~s is detected, the user 19vel program is made aware
of the change via an unsolicited entry in the completed event
queue of .IOC.. The two possibl~ lina states ar~ "connection
established" and "ccDtection brcken." T.51 will time short
line drops ~o deter~ine if the line is permanently or
temporarily down.
Any line drop of 2.0 seconds ~r greater
duration on an established lina will cause a ··connection
broken" to ba passed to th& user level program.
T.51 will access the LUT's for the channel and Bodify
cartain status information. When an initial connEction is
establishEd T.51 tells the driv~r control section, 1.51, to
bagin auto-speed detect fer the new~y conn~cted channel.
3-57
~~2l, Ih~ f2X!~
!A11Lt2§lsI1
£2n1I~1 ~~cti2n
P.S1," the" pover fail reccv9ry section of the driver
receives control frca D.04 after pewer is restored to the CPU
following a pover failure. P.51 is responsible for restol~il\g
the multiplexer interface and data set control inter:Eace
cards to the status they vere in when the power failure
occurred. I~ addition ~o restoring the device flag and
control
status,
t.he
proper .input and output channel
parameters must be restored in the multip~exer interface
memory.
The dataset centrel board interface parameters Hust
also be restored, and any interruptions pending fer "either
the multiplexers or data set control interfaces must be
handled appropriately. Any ~ultiplex~r channels which were
actively engaged in outFut at power fail time are restarted
following the last ckaract~r
previously
output.
Any
multiplexer channels which were in the input wait state have
their receivE operations terminated with a character lost
indication; this allows th~ EASIC program to rEissue the
input operation.
3-58
SECTION
OVERVIEW
I
SECTION IV
'NON-SHAREABLE DEVICES
C IJ N T E "I 'f S
KIT DI~ I VE h' (ASC 1 I FILES)
1•
f).h3
J ~ T f: ~ C 0 "J f·r I:. C T
2.
ASFH
ASC I I
j.
Ct·'H
CA~l>
r~FA[)r:P
4.
o•11
CAHU
H t::\ P F H DkJVEk
5•
LPH
l'.
6.
1).12.
LINt:: PR I
7•
PPH
P,'H·)L~
TAP,,:
d•
I.J • 1 3
PAPf.K
T ~f'l:.: P lit. (' H
9.
PHO/CPH
PAPEH
TAPt',
10.
I) • 1 'f
PHIIT!l
R r~AUI:.H
11 •
RPH
4F,~L>~~
PUNCH
1 NT r~ HP l·n: T E P. HANDLFR
1 'J. •
o • 3 ,+
pt:ADFI-I
PU~CH
I NTEHPkEl
1i •
LTH
:; ~. \~ 1 1\ IJ
L] '~I'.
14.
I) • ~ 3
S f·. R
I Nr:
HANDLER
Flf,~
HA~JDLEP
t>RINTt:R
~JTF4
HArll.>l, r: K
Ok I Vr.. ~
Pll~rH
rlJ\NDLr:"l>~
'HFAP~k
I Ai.. Lit ~ t\
L)
1 Vt-:k
H A NlJ LEI.
R I V F-: f(
Tt~RMINAL
TEP~~
4",0
F~R
DHIVI::F
tL\ N DLER
I N AL U R 1 V 1": ~I
*
.'
*
D.63 is the ~SCrI fILES portion'ot the interconnect
kit driver. The documentation on this module is broKen
into the following sections:
•
I.
*
II.
*
Ill.
*
IV.
*
v.
*
VI.
UN I'r CON'rROI.. TABLE
SYSTEM PROCI::SSOR
IOe
~EQUESTS
RF. QUE: 5 'r S
UNSOLICITED
EVE::NT~
ijCW USAGE
lOP
-
SP. PRO'rOCAL
b
4-1
*
*
*
*
*
*
*
*
*
*
**
*
*
**
*
I.
UNIT
1.
tJOHED
head of request queue tor this device
2.
UFunT
tail of request queue tor this
3.
USrAT
*
*
*
*
*
loclcal status of the device (relative to
and ASFH)
BIT 15
BIT 1.4
BIT 13
Blr 12
B I l' 1 1
device online
set when AuV received
cledred wt)en HUV, KDU received
1J1IU - WAKE lJS~k LIP MliST BE SENT
set 'lThen RDV, ALB, XR~ rejected
set wnen 5TH received
cleared wnen WUU sent or KDU received
R()V -
~ELEASI=.:
[)E\llC"~
RECI::IVJ:;D
set ~hen HOV first received
cleared when RDV finally accepted
UNIT TYPE
set UP by IOPC and never modified
=0 normal (real) device
=1
nse\ldo rlevice
ALB / XR t; Ut., S () LTC I T~: D EVE j.J T F LAG
set when on allocate butter (ALB) or
transfer input butfer (XRH) unsolicit~d
event is sent to the Ascii File Handler
cl~~rea wh~n a read or write butter
arrives dt the driver as a result of
the unsolicited event
BlT 10-0
*
*
d~vice
S~
*
*
TAKLF (UeT)
lOPC builds d table for D.n3 cn.lled the unit
control table. The UCT contains one 6 word entry tor
each Ascii File Device configured into the tOP. Each
b word entry Is called a unit control blocK (UCH). A
llCB consists of the following elements:
*
*
*
*
*
*
*
**
*
*
*
*
*
*
*
*
*
*
*
*
*
*
••*
*
CONr~OL
N0T
US~D
4.
UNlit'"
rSB loaical unit numoer
5.
lJHLEN
butter lenqth
"b •
LJDS'fS
Physic.al
(leV
ice s·ta t us
not ready
-3
-2
to: OF read
-1
no but fer available
RI..JE
n device ready
1
2
J
4
device not. .reddy
de.vicp. error
attention flp.eded"
reaM/write tailure
4-2
*
*
**
**
**
.. *
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
**
*
*
*
*
*
**
*
*
*
*
**
•*
*
*
*
*
*
*
*
*
*
.I I .
REQU£e:STS F-RO~f SYSTJ:O:M . PROCr-:SSIJR
1.
ADV - Allocate Deiice
The system processor sendsADV when a BASIC
proqram has ·assigned an Ascii Yile Device. ADV
will eventually.qet passed to the device as a
start comm~nd. Any preparation at tne device driver
level should be done at this time.
0.63 always accepts this command. An.unsolicited
event Is put 'on the CRO for the ASFH. The online" bit
is set in the unit status (USTAT).
2.
XRB - Transfer lnput Bufter
The system processor sends this command when
it wants to have data read trom a device.
A checK is first made of the pending request
qupue for this device.
If a write to the SP for the device is pending,
an lOP to SP transfer of the data is done via DMA.
If a write/control for the device is pendinq, it
1s executed. A cneck is then made of the newly
updated device status (UDSTS). If the device status
1s good (zero), we go back to the oeqinninq ~nd
checK tor more pending requests. If the status Is
bad, the command is rejected by sending the bad
status across tne receive channel. If the bad
status was minus three'(RJ~ not ready)~ no other
processing takes place. For all other device
errors, WUU 1s set in the unit status (USTAT).
If a read from the SP for the device Is pending,
it is forced to completion and processing continues
as if there Wd~ no write queued.
If there is not a write to the SP queued, the
device status (UDSTS) 1s checked. It the status
Is bad, the same bad status processing described
previously for write/control is invoked. If the
status 1s good, an X~B unsolicited eventis sent
tot h e AS F' H d n d the XRB/ A[, B b 1 t i s set 1 nth e un 1 t
st"tus. the SP command is then rejected by sendinq
a minus tnree across the receive channel for pseudo
devices, and a minus one across for real devices.
If the devic~ is real, the wUU bit in the unit
status is also set.
.
J.
..*
..
..*
..
] f
*
*
..*
*
*
*
..
..*
..
for ttle device is pendi.nq,
If there is no read queued, the device status
is ch~cked. It the status Is bad, the same bad status
processing descrioed previously for write/control Is
invoke~.
It the status is good, an ALB unsolicited
event is s~nt ot the ASfH and the XRH/ALB bit 15 set
In the unit status. The SP command is then rejected
by sendinq a minus three across the receive channel
for pseudo devices, and a minus one across tor real
devices.
It the device is real, the wUU bit in the
unit status is also set.
...*
*
*
SP
If" a write to the SP 1s Queued, it Is forced
to completion and processing continues as if there
were no read queued.
*
..
..
read trom the
reqest
It a write/control for toe rlevice is pending,
it is executed. A check is then made ot the newly
upt1ated device status (UDS'fS).
If the device status
is good (zero), we go back to the beqinninq an~ look
for more pending requests. If the status is bad, the
command 1s rejected by sending the bad status across
the receive chdnnel. It the bad status was minus
three (RJg not ready), no other processing takes
place. for all other device errors, WUU is set
in the unit status (lJSTAT).
*
..*
a
pendin~
an SP to lOP data transfer is done via DMA.
..
..
.
Buffer
A check is first made of the
queue tor the device •
*
*
*
..
..
Alloc~te
The sys t em proces so r# sends thi s command when
it nas data to be written"to the, soecitied device •
*
*
*
**
..
*
..
..
..
ALH -
4.
PCF - Perform Control Function
The SP sends this comman~ when it executes a
eTL tunction 1n a RASIC program •
. The device status (UDSTS) is checked. If· the
StdtllS is bad, the command is rejec'ted bV sending the
bad status across the receivp. channel. If the bad
status is minus three (RJE not ready); no other
processing occurs. for all other device errors,
WUU is set in the unit status (USTAT).
4-4
•
If the device status 1s good, the command Is
accepted by sending zero across the rec~!ve channel
and the a per unsolicited event is sent to the ASFH.
~he cOntrol function' to be perform~d i~ included in
tne unsolicited event data sent. The device status
is then set to minus three for pseudo, devices and
minus one for real device~. The ASFH will later
send a write/control down for the device to clear
this status.
*
*
*
*
*
*
*
*
*
•*
**
5.
The SP eventually sends this command when the
previous SP request was rejected due to a device
error. It tells the lOP to periodically retiy the
current I/O request until the device comes up.
•
*
*
*
**
*
A S'rR unsolici ted event ts sent to the ASFH
and the WUU bit 15 set in the unit status (USTAT).
6.
••*
First, the request queue' for the device 1s purged.
Pllrg 1ng 1 s descr Ibed in the IOC ,Meques ts ,sect ion ot tht s
document.
For pseudo devices, the command is always accepted
and an ROV unsolicited event is alwaYs sent to the ASFH.
•
For real devices, ~rocessinq differs. The first
time the command 15 .rece:Lved, it is always rejected, a
ROV unsolicited pvent is sent to the ASFH, and ROV and
wuU are set 1n the unit status (USTAT)~ On succeeding
RDV• s, n 0 un S 0 11 cit e d €I V en tIs pre 5 en ted' , t he com man d
1s rejected if the device 1s down (UDSTS # 0) and accepted if tne device is up.
•*
*
*
.'•
*
*
*
*
*
RDV - Release Device
The' SP sends this command when it ls de-assigninq
tne device from the current user.
*
*
*
*
*
**
*
*
•*
*
*
*
STR - Start Timed Retries
7.
KDD - Kill Device Output
The System Proces~or senrls this command when it is
aborting the current user of tne specified device.
The devicp request qu~ue for the device is first
purged. Purging is described in the IOC requests section
of this document. A purqe unsolicited event is then
sent to the ASFH and then both the device status (UDSTS)
and unit status (US'fAT) are .cleared.
4"-5
*
*
*
*
*
r1 I
•
IOC k t:-: VlJ ~: S (' ~
IJ 0 0 () ,(.(
lll) 0 X. ,(
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
**
*
*
*
*
*
*
*
*
*.*
*
*
*
*
*
*
*
**
*
*
xx =
1•
00
00
0
1
1200XX
122{)XX
1 :l.~ 0 X X
IDC Unit.
Operation
SubfllTlct.lo"n
Fllnctior,
Cont.rol worn
Jnit/Clear
Read
')
DO
~ritp
~
20
write· Control
2
40
Purge
Reference NIJmber of lCK tor Ascii Files
Jnit/Cl~ar
J I ) per u t. s a
~ 0 r li 1 n t ron t O t
ttl e UC T N n i chi s
tnt-' "sci i r"ile l'evi.ces confiqured' into
tr'lP T'lP •. Tn~ lnit/Cle~r processc')r uses t.nis as the
1 1. 11 i t t 0 ·1 1 0 0 ~' I. n i c rl doe 5 a P II r ..1 e 0 t t h P. r e Cl u est
q iJ e lJ P t (1 red end p vic ~ •
Pur '1 i n ('J i s ~1 esc r 10 e din ('j eta 11
later in this section.
t~
/..
count of
Rend
r f.:' ~ li r e q u ~ s t
A
for
A
5
e ~ :j i
an
$
,ll ~J
t ()
t ran s fer
.T () ,..
0
t
da
ta
r"1evice.
d
renuest is mdd~ rlS a result ot the SP
tor t n f' r1 e vic e • T n e 0 U t t p r i s q II e u e don .
re~a
1\ 1.1 Po
q0
thta re(Jl;lpst qlJE'llt' in tt)e UCH tor thE' device.
The
de vic e ::; t ~ t lJ 5 (U D~ 'I' S) 1 5 C 1 e d red •
A1, b / X HH i nth p
lj nit
s t ,;j t u s (U [.; l' A·I ) i. s c 1 e rt r f' d •
1 t the .~ U11 h 1 t 1 n
thf' unit stdttJ~ is spt, ~ake User 110 wIll be sent to
t. tl t-' S P •
T r\ i s 'Ii ill IJ ~ U ~ 1 1 Y res II 1 t i n the S Pre sen Ii t n q
t n e "L B ); n i c·, 'A.i 1 1 no #i t> P r.i C C e p t p d sin c e t n e 0 u t fer 1 s
t'lPre.
...·rIte
r~
rf'qlJest.s
dO
lClJ
to
~Il
trdnster
tor
d
.;evice.
'\
'Ii
sen din q
d0
i)
e
.:::to
r i t p r I? (1' J t' 5 t
X .~ H tar t h ~
sis
d n n P.
tor
1 Sir! d 1'1 e
(~e
T
\' i (" e .•
e ri Ii S
4-6
•
.:j
5
1" i) P
d
res u 1 tot t. he SP
Sd
rn p
pro c e s s 1 n q
1s
*
4.
*
*
*•
*
•."*
*•
••
*
*
**
*
*
*
**
•
**
*
*
*
*
Write/Control
A Nrite/control requests the device status (UDSTS)
in the UeB be updated to the value soecified.
The Dutter is queued on the request queue in the
UeB tor the device. Actual execution of write/controls
(le~ actual updating of UDSTS) does not happen when the
request 1s queued. write controls are execuied on
reception of ~CF, ALB, ~nd XRB commands from the system
processor, and during purge processing. See the description of tne related routine for details.
5.
Purge
A purqe requests tne clearing of "all requests from
tne specified devices request queue.
Besides being executed as a result of an IOC call,
the Purqe processor 1s also called by the KDO and ~DV
PfocesslnQ routines.
Purged status is stuffed In 0.63'5 EOT status word.
Each existing entry on the request queue for the device
1s dequeued. Any Write/Controls are executed. Other
operations are placed on the CHQ via .BUFR. They will be
De marked as purged oy .BUFR because of the
purge EQT status. When all operations have been purged,
the EOT status is restored.
*
*
Unsolicited event notices from D.b3
A.
*
*
**
~111
n
Heyister
HIts 1~-12
Kits 11-n
.~I ts 5-U
"Jot
TSA
IOC
J.<~cJist~r
~DV
ti t t
dlts
K l)j I
rlit
5p.t
loctal 2)
XRH
Hits 3"7
~et
loct"l 14)
**
f\.L,B
dit
Set
(actdl
*
*
*
*
*
*
JJCf
nits 1')-/1
.~1 t
4
Control Lntormdtion
Pi) iJ
H1.t
~
Set
(octe,l
Sl'~
8it
h
S~t
(octol 1(0)
*
*
*
*
*
give tnp
tollowinq intormittion.
SPt
.'i e '~ rl t i v e ~ lJ t t e r 1 p n '1 t h tor rl P. vic e ,
"Nitrlotlt sign nit
0
1':1-1
3
10)
SP.t
.
4-8
-.lO)
*
*
**
*
*
*
*
*
*
*
*
v.
sew
USAGE
Although there are nine HC~ words prefixing each buffer
only the last five are considered at the IOC/Driver level.
Furthermore, since D.63 is a self-queing driver handling
many possible streams, some tnings are handled ditferently
than normal. lOC does not set up the HCW's before calling
the driver - the driver does that ltself. Also, before
calling .BUFR, the driver mu~t set up the DHQ and transmiss10n log in the EQT with information that is relevant to
the' completinq stream.
*
*
*
*
*
**
*
*
*
SCw'S
wORD 1
WORD 2
(BCw 5)
wORD 3
(BCw 7)
WURD 4
(HeW 8)
WORD 5
csew
(Bew b)
9)
*
I NCOM I NG fhJr'FERS
Queuing word
lUC request
,Reques t' lenqth
Device status on
write/Controls
'fSH LU If in left
byte
Set up by driver
Set up by driver
Set UP by driver
Set up at handler
Set
up
at handler
*
*
*
*
**
*
*
*
*
SCw'S
WURD 1
"JUHO 2
WURD 3
WORD 4
WORD 5
(Hew 5)
(SCw 0)
(sew 7 )
(AC If 8)
(BC~ 9)
OUTGOING
RUF~'I:!:RS
Queuinq woro
IOC request
Transmission log
Status
TSA LU
In lett
oyte
•
, 4-9
Set up by .8UFR
As above
Set up by .BUFR
Set up by .BUf'R
As above
(CRQ)
*
V I.
-lIJP/SP PJJOTdCAtJ
*
*
*
*
*
*
tne
For every Ascii ~i1e Device related
q1ves hoCk' r:t response across its
ln~'
~ tJ J~ MAL
TUP I ::; P p P, U T (1 CAL -
FXPt..CTrD SP ACTION*-
*
lrv rlqdl~ l~ter ~SP dequeues
and then reQueues the guy)
*
*
*
*
*
*
*
*
**
*
••*
*
*
*
*
*
*
*
*
the SP sends
channel.
fo·011owing are two :tables 1 i5tinq thf' lOP responses and
exoected Sf:> action ~s c:t result.
rnP. tirst table covers
the use r not u sIn q 1 F' F: toUH 1H •
ft) e s fI con d C 0 v e r s the use r
usina If ~~HOH.
*
*
*
*
*
~ommdnd
J,q':CEIVt~
-2
K~lease
(RDV)
Swan auy out, requeue when lOP
Hecord not reddy
-1
Uevice
sends Wl',ike User Up
o
(~Ull)
Command dccepted
Continue
() e v 1 c P Not r-< e a d y
5~nd
2
Devicp r:rror
~p
3
At tent ion ''4epded
Sen rj S tar t '{ i rrl e ci Pet r j e s
operator Awt\levice uutput
(KDn)
*
heside!:;
COlT
the
e ac r 0 s S
~p€'citieri
d
t
it n y
Start'
f; t t=l
Ti~ed
Ketries
(STR)
r t T i 'Tl e d Ret r i e s (S TR :)
f'xpected t3ction, a KOO "lay
i t t he use r hit 5 b rea K •
t.i:n e
4-10
nd
~rocessing
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
**
*
*
*
*
*
*
**
**
*
*
IOP/SP PROTOCAL - IF ERHOR
kESPONSE
M~";AN
EXPECTED SP ACTlnN*
I NG
fry again l~ter (u~er can
do other thinqs and retry
the 110 later in his program)
RJl:: not ready
Release Device
-2
(RDV)
Record not ready
Swap quy out, requeue when lOP
sends Wake User Up (WUU)
o
Command accepted
Continue orocessing
1
Device Not peady
Send Start Timed Retries if the
user retries the 110, send
Kill Device Qutut If the user
de-assigns the 'Ascii File
2
Device Failure
Same as Device Not Ready
3
Attention Needed
Same as Oevice Not Ready
4
Read/~rite
-1
*
Failure
Same as Oevice Not Ready
Besides the specltierl expected actton, a KDO may
come across at any time it the user hits break.
*
..
4-11
lY]£llQn a1
g~SI1Pti~
The ASCII f.ile hand'ler coordinates communication between 1~he
,System Processor (SP) , and the handlers for
those 'de.ices
designat~d
as ASCII files cn the HP2000 ACCESS system. like the
interconnect kit, the ASCII file handler vill support .ultiple
data streams (UP to 64) through a single physical device. It is
tO'be understood that individual streams are independent of one
another.
ASPH functions both as a level 2 and a level 3 handler,
~ dependent upon th:.j charactaristics of the particulQr data
strea.lI.
Th9refore, it n~y acquire buffers which are in effect controlled
hy another handler (ASFH~level 3) or it may direct another handler'
to acquire buf£er~ uhich are ccntrolled by ASPH (ASPH=level 2).
Tho handler ~ainta~ns centrol and status information for each
data stream (see Local data structures) as vell as embEdding t~e
control illformation in the euffer Control Words (Bell) (see Global
data structures).
Buffering and processing
techniques
are
determined
by
the
device
class
as
returned
by
the
Allocation/~eallocation manage~.
Duffaring is generali2ed to nlevels where n is determined by the device class. All 'buffeirs
will be dedica'ted for the lura ticn of act! vi ty on the device.
The handler .ust ·res~ond to a number of events, both
scheduled and unsolicited~ which emanate from the SP. In ,additi.on
it will be served tJ: a single gueue through which it receiva~ work
from other handlers.
'Ihe fo1lo wing ansolici ted notification S
0
ccur:
1.
Per forti
Con trol
P unction (PCP)
carr y out the
specified control function on the indicated devic~.
2.
Allocate D~vic9 (ADV) - the indicated deviCE and data
stream should be
initialized.
This
may
imp~y
. generating a· start directive to another tandler or
acquiring and dis~atching buffers.
3.
Release Device (BDV) - the indicated d~vicE and data
stream should be deactivated. This implies generating
a stop directive tc another handler.
4.
Allocate Buffer (ALE) - a buffer ,is required for data
from the SP on thE indicated device.
4-12
5.
6.
Transfer Inp.ut Btffe,r (IRB) - a record for transfer to
the SP'is required frcm the ~ndicated deyice.
Kill
Device
Out~ut
i'ndicated dev-ica
(ill Flies RDV) .'
and
(KDO)
all
data
stream
operations
should be
on the
purged
Scheduled event noti£icaticns occur in response to REID, WRITE,
and WRITE/CONT&ot requests made to the driver.
Queue entries direct the ASCII Pile Handler to perfor. vork
at the request 'of other handlers in the system.
The type of
processing vill be determined by the Buffer Control Words (see BCW
in Global data structures).
Allowable indicators and their
Ilea ning s are:
1.
No operation
reuse •.
2.
Write
SP.
3.
Bead - for lev9l 3 devices a request for data frcm the
SP has been made
4.
stop - an end of file condition has been reachEd on an
I/O d~vice.
5.
Error - a devica error has occurred.
6.
Allocated buffer
become available.
7.
Start
an empty buffer is being
r~turned
for
- a full beffer is available for transfer to the
a previously requested tuffer has
this otly applies to leyel 3 devices and
i_plies that streaa is nov available for use
Likewise the ASCII Pile Handler queues work to other handlers in
the system and specifies precessing through the Bew·s.
Valid
queue entry types are:
1.
write - output the data to
2.
Read
3.
start
device.
th~
I/O device.
input data from the I/O device and send to the
ASCII File Handlet.
perforl
necessary
4-13
initialization
for
the
4.
Purge - purge all current operations on the device.
S.
Control - a contEol request (deYice specific) is bei:Dq
made of tte deyice.
6.
stop
stria.
perform
necessary functions to deactivate the
4-14
~.Q.m!&Yl! !Y!\£~lln'§
The AseXI File Handler (ASFO) is ccaprised of three sections.
the initialization section, ASFHI; the I/O co.plate section,
ASP8C; and the ~rimar sectic~, ASrHP.
The
initialization section is entered at syste. startup time
tille (i.e., SP ready).
At
,startup time ASPSl must:
(i.e. lOP load) and at syste. lHlT
1.
Configure all ICC
for ASCII files.
calls with the logical unit 'Dumber
2.
Do a FIND on all lcgical units to obtainQ naaes and
device types to ccmplete the SIB entr~es.
3.
Exit to caller.
At system INl! time ASFSl is entered so that it can:
1.
Purge all device gueues that are not idle and _ark them
a.s idle.
2.
Purge its ovn queue and empty it, returning any buffers
to the buffer aanager.
3.
Exit to caller.
The primer section, lSPHP, is activated when an entry exists
in the queue for ASFH. PrOCEssing consists of:
1.
Obtain entry from the queue manager.
2.
Locate proper SIS entry.
3.
Determine
4.
NOP
entry
t1~e
and branch to processing routine.
entt:y processing
a)
if device is idle, free the buffer and exit.
b) for input files, queue buffer with read reguest
to external handler.
c)
for output files, issue a read call to the
driver.
d)
for
input/output
files, use the taffer as
indicated by the stream status flaqs (i.e., read
from SP, tead from external device, or show
buffer as available) •
6.
Read entry P;OCESS - if the device is active issue il
read call to the ~river, else free the buffer and exit.
7.
write entry process - if the device is active issue a
vri te call to the d r1 ver, else free the tuffer ani!
exit.
8.
stop entry
dri ver.
9:
Error entry procEssing - if the device is active issue
a write/control rEguest indicating the error condition~
else free the buffer and exit.
10.
Allocated buffer received - if a data bQffer give it to
requestor by queueing as NOP through Qft.
If aore
buffers are required for this unit issue requests until
satisfiEd or suspended. If all requests are satisfied~
search SIS's for. units with pending requests and
attempt to obtain buffers for thea. If the buffer is a
control buffer restart the suspended device and use th.!
buffer as directed.
proce~s
- issue a write/control call to the
11. . start en try process - mark the dev ice as a vailable fOl~
use. If the device is a level 3 handler and an lD' has
been received, enter the buffer acquisition routine.
All
of th. above processes exit through -CO!-. TheIC co.pleto
section, ISPHC, vill be dispatched whenever an I/O operatio~
completes on the logical unit. for ASCII files.
frocessing
fellows this sequence:
1.
Obtain and save 1/0 ccaplete entry.
).
Locate designated SIB.
. 3.
Determine
event
type
processing routinE.
and
dispatch
a ~propriat~~
4.
Eterfora control fUnction - obtain a control tuffer anli
queue the required operation to the indicated bandler~
5.
Allocate Device
.ark device as activei fer ~e.el 2
devices issue a S1AR~ to device handler. For leyel 3
devices acquire buffers if a START has beeD recei.ed,
als E eslt.
4-16
6e
Transfer
Buffer
If there is an unused buffer
available (read/write devicel queue it for reading to
the indicated batdler. If ~one available set the Bead
"requested flag.
for tevel 3 devices present a type" 1
"device error if the host system is not· connected. IQ
all other cases nc processing is necessary.
7.
Allocate
Buffer. - If there is an unused baffer
available (read/vI:ite device) use it to read fro. the
interconnect kit. If none is available, set the output
pending flag. POI level 3 devices, present a type' 1
device error if the host system is not connected. In
all other cases, no processing is necessary.
Be
Kill Device out~ut - purge the queue of the indicated
handler and set the SIB to show device inactive.
Generate" a stop command for associated handler. Por a
L3 device turn off the active flag and exit.
9.
Release device - Generate a stop ccmmand and queue to
the associated tandler.
Mark the SIS
entry
as
inactive. For a 13 device turn off the active f~aq and
exi t.
10.
READ complete
"if the stream is inactive o~ KILLIO
status is given, free the buffer. Otherwise queue the
buffer for vritin9 to the indicated handler.
11.
WHITE coaplate
if the stream is inactive or KILLIO
status is returned, free the buffer. If the device is
a read/vrit~ d9vice perform the action indicated by the
SIB I and 0 flags (i.e., read from external handler,
read from SP, or show buffer as available). Par other
devices (read only) queue the buffer to the indicated
han dler for readitg.
12.
WRITE/ceNTROL
ccmFlete' - if the buffer is nondedicatEd, free it. otherwise process like a WRIT!
coapletion.
In the case of a level 3 device STOP
co. plating, the buffer is queued back to the level 2
handler as a STOP.
The calling sequences atd exit
points to ASPH are:
p~ccedures
for the three entry
!'§.f.!j!
entry:
JSB
SRFLG
LOTNO
ASFHI
Jf!P
ASPHI,1
LDB
ENTAD
LDA
LDB
sta rt/re sta rt f1 &9.
logical unit for ICK
exit:
entry:
entry address
HOP
JSB
ASFHP
exit:
J!lP
J~lll£
entry:
LDB
PB!!WD
BUlAD
JftP
ASPHC
LDA
IOC para vo rd
buffer address/status
exit:
Jf!P
The ASCII file handler utilizas the services of the buffer
manager, queue aanager, and allocate/deallocate .anager.
All
de vice operations are carried out through the services of QlQe anol
th~ ASCII file extension of the D.61 driver.
4-18
~~l ~ata stry~tuhe~
~ssociated
with every ASCII file data stream is a block
containing status and control information. The streaa inforaation
blocks are ordered contiguo~sly by stream id number (0-63). Each
block is 6 words long so that any SIB address can be computed by
SIBnn
= SIBCO.+
6 •
(stream
i~
The SIB entries are defined as follows:
WORD 1
15
14
q
p
f -
=
=
o-
=
=
I a
=
T -
=
=
W=
a
-~TATUS
13
I
12
T
11 10
W R
9
8
1
6
5
5
A
B
p
X
3
2
action required flag
1 inclusive OR of bits 13 & 14
0 otherwise
o~tput
requested fl~g
1 if SP output is pending
0 otherwise
input requested flag
1 if SP input is needed
0 otherwise
level 3 translate mode
1 no translation to EBCCIC
0 translation to EBCDIC
level 3 wait for buffer
, if level 2 module controls buffer when RDV received
0 if ASPH had buffer orvregained buffer following RDV
R =
=
restart flag
1 stream is awaiting allocated control buffer
0 stream not beld
5
start flag
1 a start command has bEen sent or received
0 a stop or purge ccmmand has been sent or received
=
2
1 2
=
Be
activity flag
1 an ADV has been rec~ived
0 an RDV or KDO has been received
4-19
o
E* - buffer availatility flag
= 1 buffer avail
= 0 buffer in use
- buffet' request pending.
P
= , this stream has a ~uffer request pending
=
x -
0 other vise
EC -
buffer count
number of buf~ers in
start timed retry
= , if yes
= 0 if no
under~ay'for
read/write device
for this stream
USE
WORD.2 - Queue name
name of queue to which operations for this device are directed.
woaD 3 - Device Requirements
15 - -
-
-
~
.- --12
9 - B
DBC
RCD
7
J
6 - 5
"L
3 -
RCD - restart code for allocatEd central tuffers
3 -
"-
5 6 -
7 -
8 -
9 -
issue
issue
issue
issue
issue
issue
issue
START
STOP
PURGE
EBROR
WRITE/CONTHOL
CTRL
RETRY
tBC- device buffer count
number of buffers needed for stream operation.
J - JI device flag
= , - th~s is the JI device
T -
=
device tYFe flag
0 - raad/vrite 'CTL only
= .1 - write only
= 2 - read only
= 3 - read/write••
~
-mode
0 - for card reader
=
4-20
ft
2
1 - 0
.T
=
1 - for printer
L - de~ice class flag
= 0 device class is level ~
=~ 1 device class is level 3
woaD q .- "Buffe r
Ad dress.
address of buffer for this data stream**
or buffer size
iORD 5 - r9start status if vaitirig for tuffer
status vord for allocatEd control tuffer
WORD 6 - ASPS code restart address
~olds address ~f locaticn
when buffer is obtained
within ASPH to receive control
Queuing
and
control information for inter-handler and
handler-driver c03manications are contained in the buffer control
voras (BCW's) prefixing all buff.ers. contsnt descriFtions are
found .under "Glebal data st~tctures.~
*
significant for read/write (type=l)
devic~s ~nly.
**read/write (type 3) devices are always single
buffe~ed.
£~~
~§£n.2!~on
jeadgr
~~
u] nnction
This card reader handler (CRa) can be activatEd by other
handlers in order to read caIds. The card images and any error
indications are returned to the activ~ting handler. CRB supports
the reading of cards in ASCII or EBCDIC modes.
The progra •• ing
for this module is serially reusable. eRH is a level 3 function
handler and responds to the defined level 2 - level 3 protocol.
CRH
accepts these work entry commands:
1.
Start - received frcm a level 2 handler.
activate.
Causes eRH to
2.
Read - received fre. a level 2 handler.
read a card for tte level 2 handler.
Causes CRR to
3.
5to~
Causes CRH to
4.
Retry command
may be received from the level 2
handler.- causes eRH to retry reading a fter being
previously suspended due to data errors.
5.
Allocated buffers - received from the buffet manager.
These are buffers which vere pre viously requEsted but
not available at the time of the request.
6.
Control
may te received from the level 2 handler.
Causes eRa to S9t device specific actions or cptions.
- received from a level 2 haridler.
comaence deactivaticn.
CRH returns these commatds to its activator:
1.
Nop
an alloca ted, read buffer (f ollowing a st'art) is
being returned. 11so r~ad buffers outstanding at the
time of a stop vill be returned as nOPe
2.
write - a
3.
stop - the rec9ived stop ccmmand is returne~ fcllowing
the return of all read buffers and deactivation.
4.
Error - an indication that a read error has .occurred.
compl~tEd
read is being returned.
4-22
~~~!1-S!li-str~~~~§
The start co ••and is dafined by. the following BCI verds:
BCW word 2 - Bits 13-8 ..
3-0
BCi word 3
Bits 14-0
BCW vord 7 - Bits 15-0
Bew word 8 - Bits 15-2
stream identifier
co IIlIand=3
activating handler queue na.a
buffer length
(unused)
00 - ASCII
10 - EBCDIC
no.ber of buffers
1-0
Data vord 1
Card i.ages
definitions:
Bits 15-0
returned
BCW vord 2 - !!its 13-8
3-0
BCW word 7 - Bits 1·5-0
BCW word 8
Bits 15-2
1-0
by
caa
contain
the
following
BCI
stream identifier
co •• and= 1
Nu.ber of data bytes ·Cexclud iD9
trailing blanks)
(un used')
OOzno errors
11 2 8nd of file
All other commands returned to 'the level 2 handler contain
the appropriate stream id in BCW2-bits 13-8.
For the error
command, BCWS.-bits 1-0 indicate the correct general errCl: type.
These
symbolic indirect pointers to local data are also
us~d
by CRa:
STOB
RVO
FtW2T2 -
BIOCP -
BACBe RSIZE BQUIT BID
RTYPE -
a read retry TOB (tiaer queue ele.ent)
holds na.9 cf associated vork queue
holds the i2T2 queue name or is zero if inactive
bolds configured IOC ~ead parameter
holds the current active buffer count
retains length in negative bytes for read
operations
holds address of stop buffer if a stop is
pending, ottervlse zero
holds straaa id in bits 13-8, error condition
bits in bits 1-0, and ready/not ready
transitions in bit 15.
zero if a card reader; one if a photo-rEader (see
description cf Fhoto-reader handler)
4-23
Alg2li1ll!
eRR has four entry points:
CRCHI
handler initialization,
initialization
invoked
caeHP
receives contrel f~om systea dispatcher when
primed by s,stem queue manager
CRCHe
receives control ftom system dispatcher when
scheduled rEad operations have completed
BTEI
receives centrol from tha time base ge~erator
handler when a timed pause expires
(for read
retries £ollo~ing not ready states)
by
syste.
At each of these entry pcints, register A centains the
address of the local data structure for some card read fUDction.
Subroutine RIDDS is used by all four sections to generat~ a list
cf indirect addresses for access to the actual data.
Beferences
to the local data names herein should be viewed as indirect access
to the actual data locations.
CRCHl receives the Bes logical unit number .for its associated
card reader frcm the system initialization module. This nu.ber is
merged into aIOCP for use as an Ioe param~ter vo~d throughout the
CRR module. eRCHI then ~SSUES a .FIND for its own qUEue naae.
This is needed by cQCHP to .ake .GETQ ~eguests_ The queue naae is
retained in RiQ.
The
entire handler is initially in an idle state. It is
fro. this state by being primed with a start command
containing the queue name of an activating handler as well as that
handler's desired mode of reading_
Read commands are accepted
following the start. Once started in this manner~ CRH continues
until a stop cemmand appears. Then CRa returns to its idle state.
The activating handler car. I~-activate CRH with a new start
cOIDlland.
re.o~ed
CRCHP
processes
all
entries
on its queue once ptt.ed. It
These types of entries liar
then exits with its prime ogaOte closed.
be processed:
1.
start - the activator's queue nama is retained as well
as the indicated stream identifier in Ri2T2 oand RID.
The reading mode is configurp.d into RIOCP. The read
4-24
length is saved in RSIZE. Then the desired number
buffers are acqui~ed .and returned to the activator.
2.
read
queued.
using the RSIZ! length, a
The active buffer
count
llicremented~
r~ad
in
of
operation is
SleBC
is
·3.
stop
any pending tiaed retry is cancelled. Pending
reads are purged. If the active buffer count is zero,
the stop is i •• ediately returned.
Other~ise it is
saved in RQUIT fot future return.
4.
operator
released.
5.
allccated buffer
a read buffer is given to the
activator (if still alive). A control buffer is used
to dispose of an error aessage· to the activator.
6.
control
undefined control parameters are ignored.
others allow switching of read aodes.
command
the
device
request
queue
1s
CHCHC proc~sses completed read operations. The active buffer
count is decremented.
If a stop is pending, the tuffer is
returned as a NOP. If any abo~tive error ~ccurred (purged DBQ),
the buffer is teturned as a HOP. If no error has occurred, the
buf'fel: is return~d as a write with end-of-file possibly indicated.
If'an error has occurred, the buffer is placed back on the vork
qU~Qe
for CRCBP to retry.
An error aessage is sent to the
activator, and if a not ready type, a timed retry is scheduled.
I.
Product Identification
The D.11 cal:d reader driver is designed for use with. the
HP2000 ACCESS system. It sUFPorts both the 7261 and 2892 card
readers.
(The elder 2767 cal:d reader uses an interface identical
to that of the 7261. Thus it may also be used.
However, this
document claius no specific support.)
The module is written in a
serially reuseable manner.
Hence, it wi11 support multiple
readers of an y mi X.
(The HE2000 ACCESS systt:! m will support up to
seven. )
II.
Design Overview
s §.§l!!!E t i 0 ~
Q§..2ig,n
The
module assumes a ~100 or 21MX s~ries computer. It also
the HP2000 ACCESS I/O processor microcode.
The 2892
hardware end-of-file faatur~ is supported.
r~quires
Q!.2igll !H!!!m.a!:.I
The complete driver ccnsists of tvo distinct modules(D~1'O
and D.11C). The D~110 module defines the actual driver initiator,
continuator, and power rgccvery entry points associated with any
given card. reader~
This is the only module which must be
replicated to sUFPort mul~jple readers. Th~ D.lle module, which
conta~ns the actual code, is used by
all copies of D.110.
In
~ddition,
0.110 contains all da ta of a varying or potentially
volatile nature which is required by each reader.
This includes
related 'I/O instructions, tutfer pointc:!rs, r~adinq modES, flaqs,
etc.
Cards may be read by the reader and optionally ccnvert~d to
ASCII er EBCDIC charact~r cocas. The original column binary cara
ioag~ ·may also be ::equasted.
All r~ading is done with DMA.
Power recovery proc~5singallows for proper
all scheduled reads even though reader power may be
status will be appropriately s~t in this case.
F. ~ r ~ i:"
·~·.!~l,
~!:!:'::i
h ?~ n ~~ 1 i. n 9
(·~·J~lfl~~~·;.::.;it)~~1
a 1 1...-, J
c.rl~
:3
+- :" '~
.-:.:.':~~:~:
.~ '"1
t
-.··::--~:():....
differ,
'.~ ~-: •.
s.
i
:>;1
af
~·i~:·?;.'".~.
t~rmfnation
lost.
pi. c ::: i a i. I,
~~':1~
~'2Jj
f:I"l1d
of
Error
he p p
=i.
.~!;jJ2
e~=ors are converte·d to a ccrncc~ ~as~.
Th~ occurranc~ of
(colon-colen) sequence in columns 1 and 2 of a card is
traated as end-af-file.
F0r the 2892, hardware end-of-file may be
substitut.ed for use of the "::" car::!..
a n:: ..
4-26
~
~~ng.n §IH~roas.h.
As stated above, tha driver is written in a serially
reuseable manner. Thus, the one copy cf code, D.11C, . serves all·
readers.
D.1le. accesses
a given 0.110 storage block througb a
series of indirect . poi nters.
The use of these 'pointers is
seriall!~ed
by· D.11C.
However, the driver vill accept multip19
card reader int~rtupts, queueing each such interrupt for ~.entual
service.
The method of distinguishing between a 7261 and 2892 is via
the subunit number (bits i:E) in lOT word one.
sutunit 0
de~i9nates a 2892, subunit 1 a 7261.
~gg~!@ 2.gan·izA!ig~
D.11C
contains
code
for I/O initiation (D~ 11C), I/O
continuation (I. 11C), and power recovery (P.llC). Since calls to
the D.1le section may originate both in the base level Frogram (a
JSB to .IOC.) and from Ioe (a result of a· call to .BOFi), D.lle is
forced' into serial use by a CLF 0 instruction. In this section,
the call parameters are analyzed and a read is initiated.
Allocation 10f a DMA chantel also occurs. If no D~A channel is
available, the call is r'9jEcted.
(Queued .lOC. manages this
condition by later rescheduling.-)
I.llC, the continuator section, consists Of three segments.
The first accepts interrupts and queues them for service. It vill
also dispatch the second segment for the first interrupter only.
Th~ second segment processes
an interrupt.
The third segment
dequeues a processed interrupt and reenters the second segment to
process additienal queued interrupts if any. When no interrupts
remain, I/O retires are rescheduled as requirad. Note that only
segments one and thrEe need to ~un disabled.
The P.11C pover recovery section is enter6d for each card
reader (via P.110) from 0.04. If the associated I.ll0 sEction, vas
actiVE, D~04? is used to rastcrA this condition.
However, if the
reader vas not having an intErrupt processed, but a read bad been
sch~duled,
an interrupt is forced to cause normal I.11C error
J;:roc~ssing to effect recov~ery.
!n~!~~~~~ ~~i~!
The second segment of I.11C first astatlishes the driver's
indirect pointer' list to access th~ D.110 storage block for thg
reader whose interrupt is being processed. N e.xt, error detection
is done using a different status examination .procedure for each
tt-27
reade~
type.
For the 7261 only, up to 10 retries are attempted
for pick failur~s before the error is considered "hard." ~be 2892
hardware end-of-file status is recorded.
(It may be overridden by
siaultaneous occurrence of a "::" card.)
Next the significant data count is obtained using the,D~A
length control word.' Note tl:at this allows the 40 coluan feature
of the, 7261 to be suppotted.
Since th~ 7261 and 2892 column
images are oppcsite, the 7261 image is r9verS6d at this point.
Rov 9 will appear in computer word bit 0 and the "twelve" rov in
word bit 11.
Tha reading mode is Exaained next. Note that reading does
not occur· direct If in to the calle r 0 s buf fer.
Rather,
an
intermediate 80 ~ord' buffEr in 0.110 is used~ The data is now
moved and converted from this intermediate buffer into the
caller's buffer. The caller's length is honored and ove~r1des the
actual significant read lergth.
In all casas, the returned
transmission log reflects the Lumber of columns read less any
trailing blanks. This count may b~ l.ess than the requestor's read
length.
Data is .oved to the requestor's buffer afte~ Fossibla
conversion to ASCII or EBctIC character representations.
The
~etection
of any erroneous punch combinatio'ns in this case vill
result in a data error status. The completed read operation is
now signalled via .BUFR, and the used OMA channel is released.
IT!.
Design Structures
In~!;t~£~ d1~~iE1i2n§
.
Any current op~ration is
driver enters an idle, available
DMA is releasEd.
abortEd.
The
s~ate.
JSB .IOC.
OCT OOOOxx
(xx:1ogical unit
t)
.R29.
A card is read and transferred
Optional data conversion may cccur.
to
the supplied buffer.
JSB • IOC.
(x,X =109i cal unit.)
OCT 010nxx
J PoP REJCT
DEl BUFFR
DEC m
4-28
m=positive numtcr of desir~d card columns
n=O·- ASCII r~ad mode
1 - column binar1 read mode
2 - EBCDIC rEad mode
.
The returned transmission log alway~ rsflects the number of
card columns requested !!§! any trailing blanks. The st~tus word
includes these bit definitiocs:
1L1
1:0
= error
=0
- no error
1 - pick fail or othar not ready ccndition
2 - da ta ~rror
'3 - and-of-file .
]~§£r~pti2n ~ 1~~!j2n
The Line Printer Handler is responsible for nor.al flow of
print lines to the printer and notification of its call4r of
printer errors and printer cOI~let~on (end-of-file; obtained from
calling program).
The Line Printer Handler vill eff.ct the
emptying of tuffers throug! the queue manager and calls to .IOC.
to print user output on the line printer. The handler vill adhere
to the defined level 2-levEl 3 protocol. This module is written
in a 'serially reusable' lanner with all locally used data
accessed fro. a unique storage block. Thus~ additional Frinters
may be added by re~licating this storage block •
. 'The hand19r has thre~ entry points: a "prime" entry which is
used when a queue entry exists and is to be processed and an "IO
complete" entry which is used when an operation initiated by the
"priae" entry, has finishEd and the queue entry processEd aust be
returned tq the proper place; and an initialization entry called
during system startup and restart.
.
The "pri.e" eRtry will obtain an entry from the input queue
and attempt to do a .lOC. call tc process the buffer.
The lila ccmplete" entry will examine the ret·urned inforaati,on
from a completEd operaticn aId da~ermine if an error 6ccurred. If
an error occurred, the handler will issue a priority .IOC. call 'to
reschedule the request and irform the· level 2 hankler of the
~rror.
If nc error occurred, the entry will be returned to the
proper handler queue.
Input queue entries may be cne of the follovin,g:
1.
2.
start
buffer.
received 'from a level 2 handler in a control
It activates the handler.
Write - receive' frcm a level 2
handl~r.
Contains data
to be output to tte printer.
3.
Sto,p -~ received from a level 2 handler in a print
buffer. It causes the handler to begin teraination
pro ce 5S in 9 .'
4-30
4.
Allocated buffer
received fro. the buffer .anager.
The buffer is reCEived as a queue entry if DC buffers
were available at the tiae cf the initial request.
5.
Control operation - recieved in a centrol butfer by a '
level tvo handler. ,It is used to perfor. special
carriage control cperations when in the print-thenspace mode.
1'he 'control buffer is freed by this
handler.
6.
start timed retries - received from a level 2 handler
when the printer bas indicated a not ready ccndition.
7.
Purge
received fro. a :Leyel 2 handler. A clear IOC
call is .ade to purge any outstanding writa requests •.
Output queue entries may be
1.
NOP
'an
~ny
of the following:
allocated write buffer or a completed write
'
buffer is being I:etul:Dad to the caller.
2.
stop
the sto~ command received by this handler is
being returned to the caller to indicate ter.inatioD
process ing is COli ~lete.
3.
Error - a notification that a write error bas occurred.
The star't; command is :iefined as fellows:
BCW vord :2 -
stream identif1er
coamand:3
activating handler queue naae
buffEr length
OO:zspace then print
01.print then space
nUBber of buffers'
Bits 13-8
3-0
SCi word 3 - Bits 14-0
BCW vord 7 - Bits 15-0
BCW word 8 - Bits 1-0
Data word 1
Bits 15-0
The print buffer is defined as follows:
vord 2 - Eits 3-0
BCW word 7 - Bits 15-0
Data word 1- Bits 15-0
command=1
BCW
Bits
length
pri n t-then- space, not used
spa ce-then- pr int , control
zero
1-0
4-3).
A19PIi:t.b!
ERSWT is set when a printer error occurs and is not reset
until a line is successfully printed. This mechanisa is used to
provide only one error notification to the oriqinal sender when a
printer aalfuhction occurs. PRBUF is used to store the address of
the printer buffer in case Euspension due to buffer not available
occurs during error processing.
The
four
entries
to
the
handler
are:
LPRI~
the
initialization entry; LPHP, the primer entry: LPHC, the I/O
co.plete entry; and LPHT, the timar expiration entry. At each
entry point, subroutine PADDS is used to create a list of indirect
addresses to the local data structure.
In .the initialization section LPHI, the logical unit number
of the device is saved and the handler's queue name is "found and
sa ved.
""
LPHP handles one queue entry at a time when it is primed.
The queue entries are procassed as follcvs:
1.
start· - the acti vat~r' s queue name", the strea. ID, aad
the print .ode ate, saved.
The required nu.ber of
buffers are obtained and returned to the activator. In
print-then-space lode, a vri te IOC call is .ade- 1111 th
control code aqua] tc one to cause"a skip to top-of~
forll.
2.
print - in space-then-print mode, the PCF control code
is .oved froa Data word 1 to BCW9 and the IOC call is
issued.
In print-then-space mode, the centrol code
saved in LPCON is .eved to BCW9 and the IOC call is
issued."
LPCON is then reset to the default control
cod"e
(space 1).
.
3.
control
the FCP control code is saved at LEeCN and
the control buffer is "freed.
4.
stop . - the print buffe~ containing the stop co •• and is
used to issue an IOC call with length equal to 0 and
BCR9 control cod~ equal to 3 (space 1).
5.
all ccat Ed bu ffer - the buffer lIay be
or a print buffqr. 'the con"trol buffer
an error indicatien to the activator
condit~on occurs.
~he allocated print
4-32
a con trol bu:Efer
is used to ~Iend
when a net ready
buffer is made
interlocked, the stream ID and NOP com.and are placed
in BCW2 and it is sent to the activator.
6.
sta.rt· timed rat~y - il tiller is st arted il.nd the buffer
is freed. In t.he tiaer exit, a release IOC request is
.ade to reinitiate the operation.
.
7.
purge
freed.
a clear
loc
request is made and the buffer is
ihen control is received with indication of an I/O co.plete
the follewing sequence of events cccurs: The 'status of the
request is checked· to determine success of thi·s operation. If
successful; bits 15 & 14 of ~egist·er I or word 3 of the buffer
prefix will be zero. In this case, the buffer is returned to the
activator with com.and code=O~ If ava~ilability is set tc one the
device was net ready and the handl.·r vill issue a priori.ty .IOC.
call to requeue the unprocessed buffer.
A centrol tuffer is
obtained and sent to the activator with co •• and code=6 to indicate
the occurrence of the error.
ev~nt
4'-33
I.
Product Identification
.fI2S.Y£1 abstrA£t
The D.12 line printer driver is designed. for USE with the
TSB/2000G System and will !u~pcrt both post-spacing and prespacing .print modes for tte 2607, 2610, 2613, 2614, 2618, 2767,
and 2778 line printers.
II.
Design OVErviEw
Y~ign A!2Y~2!i2n§
!his dri~er is designgo to run on a 2100 series ccaputer and
requires anyone or ~ore of the interfacas for the printers listed
above.
It also requires tte microcode described in the Phase II
Base Design.
Qe§~g.D
Jymmau
Tvo modes of operaticn are supported. In the pre-spacirig
print mode, the carriage contrcl will be issued and then the
characters in the tuffer vill be transferrpd to the printer. This
line vill not actually be printed until the next control operation
is performed ,carriaq~ contrcl for th9 next lirie). The~efore~ it
will be nece~sary to issue a control operation tb the drivEr vhen
~nd-of-file is reached.
A post-spacing mode will also be supported. I n this mc)de,
characters in the buffer vill be transferred to thE pril~ter
before the contrel operation is i~sued.
th~
All printer types listed above will be supported by this
driver. The a~Fropriate control function routine is detErmined by
the unit number in the EQT.
The following functions will be performed by D.12:
CLEAR
reset all status. words and issue a clear control
request tc thE printer.
WRITE
transfer a blcck of dat a to the printer and i.s$ue a
centrol operation either tefore or after the charactErs ar9'
transferred.
4-34
~.§i.9n n.n£2.A",l!
This drivEr- is written in a seriallyrellsable manner. In
crder to si.plify· the additicn of printers to the -system, the
~river
is composed of twc separate and distinct modules. The
first contains the unique entty points and the local data storaqe
for a given printer. When another printer is added to the system,
only this code ~s ~e~licated.
.
The second mudule is the serially reusable code use~ by all
copies of the first module. This common code, D.12C, is composed
of three basic units; the initiator section, the ccntinuator
section, and the·pover recovery section. The initiator section is
;~ntered
on an IOC call and is all disabled code. This is
necessary because it may be Entered by -.BUFR on the completion of
a print line for any printer driver. The ccntinuatcr section
handles onG printer interrupt at a time.
If another interrupt
cccurs while this section 1s in use, th~ interrupt vill bE queued
and processed when the actiVE cne is completed.
In the pover
recovery section, the status of the printer driver is checked and
~ set control 1s issued if required to create an interru~t.
~.§.g"i.a~iQ!l
The printer is cleared with a eLC instruction and all status
words are cleared.
JSB .IOC.
OCT OOOOXX
XX-is the logical unit number
No rejects are possible.
1.
Get printer
2.
Issue
3.
O~data
sta~us.
etc to tha
~rinter.
status word in the lQT.
4-35-
4.
Clear driver status flags.
5.
Return to caller.
Q~~Ii~I12~
.ans
~n£!i2n
Transfer a block of data to the printer.
!he contrel
operation is issued before or after the characters' are transferred
depending on the subfunction code in th~ IOC call.
The contrel operation is translated to the appropriate format
control code required by the printer interface.
The proper
routine fo~ the translaticn is d~termined by the unit number in
tha EQ~. The EQT unit numbers are d~fined as follows:
tti.n:t i ! l.IEi
o
1
2
3
2607, 261C, 2614
2613, 261A
2767
2778
The contrel code for eaeh printer line is located in Sits 158 of BCW 9. Control codes are defined as follows:
£2~
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
~ll~~
!~i2n n~~~~!~g
t!2.Il!al
end-of-file
skip to cha nnel 1
skip to channel 2
skip to cha nnel 3
skip to channel 4
skip to charnel 5
skip to channel 6
skip to cha nnel 7
skip to channel 8
skip to cha tnel 9
skip to chann el 10
skip to cha tnel 11
skip to channel 12
suppress spacing
true single space
true double sFace
true triple space
ignored by driver
top of fora
bottom of form
ngxt line
next double line
next triple line
next half page
next quarter page
next sixth page
noaxt line
next line
next line
next line
suppress paper advance
same
same
same
4-36
Channels 9 through 12 exist on 'line printer
for optional installation 4efinition of
c~pabilities.
They are identical tc channel 1
supplied VFU tape. These channels do not exist on
and 261~ models and thesE cedes will result in
action for these printers.
2618
mode Is 2613 and
additional
VFU
on the factorythe 2607, 2610,
the 'next line'
ID.H':~~1! . §.2~l:~~lJm§
JSB • IOC.
OCT 020Y.IX
Reject Address
Buffer Ad dress
Buffer length
where XX is logical unit 'number
and Y=O for pre-spacing print mode
Y=1 fer post-spacing print mode
The c~ll may be rejected if the driver is busy.
return is made with:
.If so,
~he
1=1
8=100000
The transmission log
transmitted to the printer.
will reflect the number of characters
If th~ driver is not busy, the print operation is started in
the initiator SEction of the driver. Either the format control
word (pre-spacing) or the first character in the buffer (postspacing) is output to the printer.
In the continuator section, the n~xt character is output to
tha printer. When the buffer:' is exhausted, the format centrel
word is output (post-spacing mcde) to ~h~ printer and then .BUFR
is called. Interrupts that cccur while this s~ction i$ in use are
qu~ued
for later processing.
Before exiting,
this queue is
checked for .work and all qu~ued interrupts are processed.
All commands to th~ print~r are channel type commands.
single and doutle spacing are accomplished' with 'skip to channel
3' and 'ski p to channel 4 t
ccmmands respective lye
The Paper Tape Punch Handler is responsible for nor.al flow
of output to the paper tap9 ~unch 'and notification of its call.er
cf errors and completion (end-of-file; obtained frca calling
program). The Paper Tape PUJ::ch Handler "il1 effect the eaptyj.ng
of buffers through the queue manager and calls to .IOC. to punch
user output on the paper tape punch. The handler is written in a
• sar ially reusable' aanner a nd will adhere to the defined level 2level 3 protocol.
The handler has four entry points; a "priae" ent~J wbich is
used when a queue entry exists and Ls to be processed; an ~IO
.co.plete" entry which is used when an operation initiated by the
"priae" entry bas finished.a Ild the que ue en try 'processed .ust be
returned to the proper place; a timer ent'ry used whEn a tiller
expires; and an initializaticn entry called during syste. start,up
and restart.
The "~rille" entry vill cbtain an 9ntry fro. the input queue
and atte.pt to do a .IOC. call tc process the buffer.
The "IO complete" entry vill examine the returned inforaati.oD
fr:om a co.pletE d operation a r.d deterlline if an error occurred. If
an error occurred, the handlEr vill issu~ a priority .IOC. call to
reschedule the request and inform the level 2 handler of the error
condition.
If· no error occurred, the entry vill be returned to
the Eroper handler queue.
ln~!A~ing
Input queue entries may be cne of .the following:
1.
start
buffer.
received from a level 2 handler in a control
It acti vates the handler.
2. .
write - received frem a level 2 handler.
to be output to tte paper tape punch.'
3.
stoF
contains data
rec~ive~
from a level 2 handler in a write
buffer. It causes the handler to begin teraination
processing.
4-38'
4.'
S.
6.
Allocated buffer
received from the buffer manager.
The buffer is recEived as a queue entry if nc buffers
were' available at the time of' the· initial request.
,Start
timed rattiES - received from a level 2 handler
the paper ta~e punch has indicated a net ready
can dition.
'~hen
Purge
received from a level 2 handler. I clear IOC
call is made tc p~tge any outstanding write requests.
output queue entries may.be any of the following:
1.
NOP
an allocated write buffer or a coapleted write
buffer is being returned to the caller.
2.
Sto~
3.
Error - a notification that a write error has occurred.
-. the sto~ ccamand ~eceived by this handler is
being returned to the caller to indicate teraination
processing is ccml~ete.
the start co.mand is defined as follows:
BCW word 2 - Bits 13-8
3-0
BCW word 3 - Bits 14-0
BCW word 7 - Bits 15-0
1-0
BCW word 8 - Bits
Data vord 1
Bits 15-0
streaa identifier
co •• and=3
activatinq handler qUlue naae
butfer length
OOspunch .ode in Data verd 1
01=punch mode changed by
control operation
number of buffers
The write buffer is defined as follows:
BCW word 2 - Bits
3-0
BCW word 7 - Bits 15-0
Data word 1- Bits 15-8
7-0
eo.mand=1
length - positive bytes
punch .ode - RJE
zero
The algorithm for processing is given below:
ERSWT is S4t when a punch error occurs and is not reset until
a line is successfully printEd. This mechanisa is used to provide
only one error notif~cation to the original sender when a d~vice
malfunction occurs. BUPPH is used to stor~ " the address of the
write buffer in case suspension due to buffer not available occurs
during error p~ocessing.
The
four
entries
to
the
handler are:
PPCHI,
initialization entry; PTHP, the primar ~ntry; PPCHC, the
complete entry; and PPCHT, the timer expiration entry.
'the
I/O
In the initialization section PPCHI, th~ logical unit number
o£ the device is saved an~ tte handler's queu~ name is found and·
sa ved.
PPCHP handles one queue entry at a time when it is primed.
The queue ~ntries are processed as follows:
1.
start - the activator's queu~ name, the stream ID, and
the mode are saved. The reguired number of tufters are
obtain£d and returned to the ·activator. An ICC call is
made to create thE tape leader.
2.
write - an IOC call is made to output the characters in
the buffer.
3.
stop - the output buffer containing the stop c~mmand is
used to issue an IOC call which causes the driver to
ami t a tr ailer.
4.
allccatEd buffar - the buffer may be' a control buffer
or a write buffer. 7he centrol buffer is used to send
an error indicaticn to the activator when a net ready
condition occurs. the allocated write buffer is made
interlocked, the stream I D and NO P command are pla~:ed
in BCw2 and it is sEnt to the activator.
5.
start timed retry - a timer is started and the buffer
'is freed. In the timer exit, a release IOC rEquest is
made to reinitiatE the operation.
6.
purge
freEd.
a clear IOC request is made and the buffer is
When control is received with indication of an IIC complete
avant the following sequenc9 of EVEnts cccurs: The status ~f the
request is checked to detetmine success of this operation. If
successful; bits 15 & 14 of Iegister A cr word 3 of the buf:Eer
pr~fix
vill be zero. In this caSE, the buffer is returned to the
activator with command code=C". If' availability is set to one the
levice vas not ready and the hand13r vill issue a prioIity .IOC.
call to'requeuE the unproc~ssed buffer.
A control tUffer is
4-40
obtained and sent to the activator with co.mand code=6 tc indicate
the occurrence of the error.
I.
Product Identification
.f·!:2.9'!!~ a~~!U.£1:
The D.13 tape punch driver is designed for use with the
HP2000 ACCESS system. tt SUFPorts the HP 12926A paper tapE punch
subsystem.
The mcdule is vIitten in a serially reuseatle manner.
Hence, it can support multiple tap~ punches.
~he
HP2000 ACCESS
system vill su~port up to seven.)
II.
Design OVErviEw
The module assumES a ~10C or 21MI series
requirEs the special microccde d~ve1cFed for
Processor of the HF2000 ACCEfS system.
~ompute~.
use
in
It also
the I/O
nl~iS1.n '§.Y!m.~U
The complete D.13 driver consists of two dist!nct modules
(D.130 and D.13C). The D.13C mcdule defines the actual driver
initiator, continuator, and Fower recovery entry points associated
with any given tape punch. In addition, it contains all storage
{cOnstabts, pointers, I/O instructio~$, atc.) which is unique to
that given tapE punch. Th~ C.13C module contains the actual code
used to drivE the device. It is called by th~ D.130 module and
then utilizes the uniqu~ stcraqe provided by ·the caller to
associate itself with a spccJfic tape punch.
The operation of the
tape punch includes provisions for
punching laaders and trail~rs and for punching data in ree-crd mode
or transparent mode.· Ir. the ~ecord mode, each buffer cf data is
~unched and an X-OFF, carriage return, line feed s~quencE is
then
appended by the driver. Each record may be punched with.aven, odd
or no parity. The parity putches are supplied by the driver.
(Except for no parity for which no alteration of ~EvEl eight
occurs.) lfi th& transparent lode, no mcdifications to the data are
made.
Power recovery ·operation ir.clud'3s the punching of a record
delete sequence (control-X, ~arriage return, line feed).
Also,
any record currently bging pcnched is restart9d.
Error
handling
a110\5
only for a "not r~ady" er~or
indication. A non-process timeout is a .provision of the driver
intended to make up for the general lack of status bits in the
tape punch interface. ~ach titre·a tape fram~ is punched ("i.~.
4-42
started), a 1 second timer is started. If the timer expires prior
tc a punch complete "interrupt, the punch 1s considered down and a
"not ~eady" error is sat. The occurr~nce of a lov tape supply
also causes a "not ready" ~rtOt.
Is stated above, the driver is written in a serially
reuseable mannEr. This meana that a single copy of D.13C (the
code) is used by" multiplE copies (and, he~ce, multiple tape
punches) of D.130. Access te the storage in a given-D. 130 module
by
D.13C is done via indirect addressinq through an indirect
pointer list. This "pointer list can only address one D.130 module
at a time.
t.13C is thus forced to run serially to preserve the
integrity of this list. LatEr descr.iptions vill shov, hovever,
that this does not impare the driver's ability to handle multiple
interrupts frOID different ta,e J:unches."
"
The
following
documentation
description of the D.13C module.
will
confine
itself
to
a
D.13C
ccntains
code
for I/O . initiation (D.13C), I/O
continuation (I.13q, pov~r r.covery (P.13C), 8ndncn-process
timeout handling (T.13C).
since calls to the D.lle section may
originate both in thebas"e level prograll (a JS B" to • IOC.) and from
IOC (a result of a call to .EUlR), D.lle is forced into serial use
by a eLF 0 instruction. In this section, the I/O call parameters
are analyzed and established, and th9 initial I/O operation is
begun.
.
I.13C, the continuatot section, consists of three segments.
In the first segment, an 1nterru~t is accepted, and the D.130
storaga for the associatad punch is enqueued to a linkEd list of
storage blocks which require interrupt service.
This is dona
without disturbing any of the module's indirect polnt~r list. If
this enqueueing process determines that the interrupting punch is
not the first (at least cne ether storage block is already
enqueued), then an interrupt exit is immediately made.
This is
possible becaUSE the first stcrage block to ba enqueued will cause
entry to the second segment cf I.13C which will begin to process
~ll such interrupts.
In the second segment, the tOt 0.130 storage blcck on the
interrupt 'service queue is ptocessed. !ha indirect pointer list
is set for ~his block, and the int9rrup~ is precessed. (Sea
"discussion of actual interrupt
SI? rvice
below.)
Pollowing
4-43 ..
interrupt service, the third I.13C segment receives control. It
disables the system and reMoves th~ top 0.130 storage bl~ck from
the interrupt service queue. If other blocks are still queued,
the second segment of I.13C is entered. again.
When all D.130
storage
blocks
have
been serviced and dequeued, required
additional I/O is begun for all punches needinq same.
~hen
an
=!xit from the original (vary first) ta ~e punch interrupt is made.
The P.13C power recovery section of th~ module is entered for
tape punch (via P.130) at pover recovery time. It is called
as a subroutine fro. 0.04 a~d takss a~Eropriate action to restore
service. p.1le always emits a record delete sequance consisting
of control-X, carriage rettrn, line feed. This is to canc~l the
affect of any spurious punches associated with power IEstoration
at the punch itself.
(This sequencp. is punched with even parity,
since it may be impossihle tc d~termine tha mod~ in current use.)
Finally, the ~roper state cf the device's flag-and centrol bit
settings is restored.
~ach
since the driver uses timed punch operations to detEct "down"
punches, a common T.13C ncn-~tccess timeout exit is a part of th9
driver.
It receives control from the D.43 time case gener,ator
module. T.13C first checks for a set flag on the punch.
'rhis
would indicate. that ar. intErrupt is pending but has not yet· been
allowed. No error is indicatpd in this case.
However, if the
flaq is clear, the non-precess timecut error bit is set, and an
interrupt is fcrced in ord~r tc effect recovery by the interrupt
processor.
In~!~I~E~ ~~£!1£~
the second segment of I.13C proc~ssing is thE inte~rupt
service segment. Interrupts occur eith.er beca use of ii sched lllled
operation compl~tinq, or tecaus~ an interrupt is forced wh~n a
non-process timecut occurs.
The first action of the intertupt service code is to
acknowledge the interrupt with a CLC instruction.
Next, errors
are. checked. If a non-prOCESS timeout or lov tape supply exists,
tha operation is immediately terminated with a call to .BUPR.
If
no eIro~s ha~e cccurred, the pow~r re~overy flag is tested. If
set, the original I/O operation parameters are r~s~ored so as to
~ffect
a ccm~l~te r~start cf the current operation in the
remainder of the proces3ing.
Finally, the character output
routine is invoked to select and cutput the next appropriat9
frame.
If no mor~ data remains, the operation is instead
terminated via .~UFR.
'4-44
The character output rcutine is used both by D.13C to output
the first frame and by Z.13e for subsequent frames.
-The routine
first checks for operation e~d, updating buffer pointers and
lengths in the process. That the mode is checked. Either a feed
frame is selected or a record datum. In the case of record data,
parity is applied as required. Additionally,.at record end for
ASCII modes, an X-OFP, carriaga return, line f.ed sequence is
appended. When the charactet has been selected and output, the
type of entry is check9d.
If entered fro. D.13C, an "STC
instruction and its ti~er are invoked to start the punching.
If
an I.13C entry,' the STC instruction is enqueued for "future
axecution by the third segmant of I.13C. This is to prevent an
interrupt on a punch whose 0.130 storaqe block is engaged in
servicing other tap\! punch interrupts.
(That is, it vas the
original intarrupt~r.)
III.
Design structures
,&}.ear
Any current operation
available and idle state.
aborted.
is
The
driver
ent~rs
an
JSB • IOC.
OCT OOOOzx
" (xx=logical unit
t)
!"llf
A block of data is t=aDsferred to paper tape. optionally, a
leader (or trailer) may be Froduced.
All such operations are
scheduled with a basic write command with appropriate aod9
settings for the various punch typ~s.
JSB •
IOC.
(xx=logical unit
OCT 02nnxx
t)
J"P REJCT
DEF DATA
DEC m
m=number
of
bytes
of
leader/trailer frames)
data to be
in ~~ a~~
nn=OO - ASCII mode with eV9n parity
01 - ASCII mode with ~dd ~arity
.02,- ASCII mode with no parity
03 - transparent mode
4-4·5
output
(or
number
of
20 - Ip.ader/trailer mode
In
the nti=20 case, ~he data buffer address is insignificant. Por
00 to 02 modes only, X-OFF, carriage return, line feed is
appended by the driver to all records. No parity means that no
alteration of the eigth level cccurs. It is forced neither high
nor low. It remains as supplied by the calle:.
~he
~Ial~~ 1nf2~mA!iQn
The transmission log always returns the original length of
the caller's request. This is to facillitate retries. The status
bits include bit 14 which indicates the occurance of some ~rror
and bit 0 which is one to indicate the occuranC0 of a' punch "not
ready" conditicn.
4-46
12!!.§SD:R!i2n. §.llg
,~'ynctioll
The programming for this handler is the same 'as that for the
card reader handler. Where it is necessary to' distinguish between
a card r~ader and a photo-reader, the dode tests a variable in the
respective local storage to determine the' appropriate action.
Actions specific to the photc-reader are outlined belove
In CReRI, the photo-reader type causes an alternate device'
designator to te used in finding the associated queue name.
In CRCijP, these alternate command. processes occur:
1.
start - differing read m~~e indicators are established
in the .IOC. paraletex word
2.
control
different set of control parameters
allowed to set varying .IOC. parameters.
is
In CRCHC, if EBCDIC reading is selected, the translation from
ASCII to EBCDIC occurs at this level •
...
4-47
I.
Product Identifjcation
g!QgY£~ A~~1!A~1
The· D.14 pa~er tape preto-reader driv~r is designed for use
with the 2000 ACCE$S SystErs~
It supports thp. 27~8 reader.
Because it is w.ritten in a serially re·u9!able manner, it will
suppcrt multiple readers.
(~he 2000 ACCESS system vill SUFPort
a
maximum of seven)
II.
Design OVErview
The
requires
module assumes a 2100 or 21MX series computer. It also
2000 ACCESS. FiilllDare cpticn (13~6A or 1320;A).
tb~
]~.§igll ~]ml!l~I.I
The
c6mplete driverccnsists of two distinct modules (D.140
The 0.140 modulE defines the act~al driver initiator,
continuator, timer, and pcw~r r~ccvery entry points associated
with any given reader. This is the only mo~i!:nle which must ba·
replicated to support multiple readers. Th~ D.14C modulE, which
contains the actual code, is used by . all cop,ies of D.140.
In
addition, D.140 contains all data of a v~rying or ~ctentially
volatile nsture which is required 'by sach rea·ilier.
This includes
related I/O instructions, buffer pointer~, fl~gs, etc.
~nd
D.1~C).
The driver supports four modes of tape leading. Three modes
. provide for varying types of ASCII data formats, and the fourth
mod~
allows tranSFar~nt reading. The only differencg tetween the
ASCII modes is in the form of Farity testing leven, odd, or none).
In· tha transparent ~ode, any and all frame p.nch combinations are
valid.
Power recovery proc~ssini allows for proper_termination of
all scheduled x:eads Even t he ugh reader powe r may be lost.
Erl;or
gtatus will be appropriately set ic this case.
Error
handling
allows
the
det~ction
of parity errors for
appropriate reading modes.~· !ince. the: reader interface has'- no
inhere n t Un ot rea dyt. st at us, all rea d 0 p.;ra tions are ti DIE d, anci a
read tim~out is USEd to effe~t net r~ady errors.
For the ASCII
r~adin9
modes, an end of file condition is defined by the
occurrence of 80 or more consecutive· null frames.
4-48
]iligA !B.E~2~.b
Since ·t~e driver l's written in a serially reuseatle manner,
one copy of code (D. 14C) serves all readers.
D.14C accesses a
given- D.140 storage block via a serias of sy.bolie indir~ct
Fointers. The use of these J;:cinters i.s- se rlali zed . by D.14C.
However, the driver will accept Ill.ultiple reader interrupts,
queueing each for eventual service.
~gg~l!
g;q a ni!ss12a
D.14C
contains
code
for I/O initiation (D.14C), I/O
continuation (I.14C), pover recovery (P.14C), and timerezpiration
(T.14C).
Since calls to thE initiator section may originate from
both a base level Froqram (a JSE to .IOC.) and from IOC (a result
of a call to. BUPR), D.14C i~) forced into serial use ty a CLF' 0
instruction.
In this section of the driver, the call ~ara.eters
are analyzed and a read may te initiated.
I.14C, the continuator section, consists of three segments.
1ha first seqment runs disatled and enqueues the interrupting
I0140 module for eventual inte~rupt service.
The first such
lDod'ule enqu~ued causes the second segment to be entered.
Seqllent
two remov~s an enqueued I.1QO medale and establishes the indirect
symbolic pointers to the module data.
Then the system can be
. enabled while tha interru~t is serviced.
Interru~t
service
includes accepting the input datum-and adding it to the caller's
buffer.
parity, end of file, and other tests are perfermed. At
the end of interrQ~t service, SEgment three gains control.
The
system is disabled, and the ~odule is degueued. If other modules
require service, segment two vill be re-entered.
P.14C gains centrol fIom the D.04 power fail/r~start module
for each P.140 entry point. If the associated I.140 section was
active, D.041 is used to restore this condition. However, if the
reader was inactive (I.140 itactivE) but a read had been started,
an interrupt is forced to cause I.14C to effect recovery.
T.14C gains control if a given T.140 timer has expired. This
indicates a failing read. Crlees an interrupt is pending, one is
fo~ced to cause normal recovery.
~s.d;gl.f
!2n!;il
These symbolic
0.140 data:
PREQT -
indir~ct
fointers .re used in D.14C to access
holds related ECT address
11-49 .
PRIOR - hclds address of last .IOC .. parameter list
PFLAG - driver flags:
15 - tusy driver
1 4 - ski F (:i ng f 0 JC CR
13 - IeSUIIE reading after control-X
12 - 1=data has been read
10:8 - device status
O=ready
1=read tille out
2=unrecoverable read error
3=data error
7=end of file
2:1 - C=even parity
1=cdd pa ri ty
~=no parity
o - t=transpatent mode (bits 2:1 ignored)
C=ASCII mode (bits 2:1 apply)
PBUFR - hclds byte address of input
PLENG - holds negativf:! tEad length"
PLL
- bolds original Iead length
PEOFL - holds negative count for EOP detection
PSTC - STC subroutine (uses PFRIO and',' therefore has STC flag
word)
.."
PTQ! - a four word TOE fer read timing:
peLC - associated eLC instruction
'
PLIA - associated LIl ~nstruction
PSFS - aSEoeia~ed SFS instruction
PSTF - associated STF instruction
These data are specific to D.14C:
PIOO PEXITPlNQ I.14 -
for pendJng STC instruction
to int~rrupting I.140 entry point
for i~telru~t service
to 1st interrupti~q I.140 entry point
• BUFP- • B DFR EQTparame ter
a queue
pointer
a queuE
pointer
The following
module detail.
D.140:
D.14C:
~structured"
description
provides
JSB to D.1QC;
disable; save r~gisters;
establish indirect Fcinters to 0.140 storage
using contents of D.14C as basE address;
transfer conten~s cf D.140 ·to n.14C;
res tore registers;
storE A into PREQ1 and B into PRIOR;
4-50
internal
load and isolate tits 14: '120£ I/O request
parameter in register A (PRIOR indirect):
if A=O (clear) then do;
issue eLC tt stop interface;
purge tim~r using .LTC.; disable on return;
clear driver flags (PPLAG);
set EQT status to zero;
exit via 0.14(;
end:
if PFLAG bit 15 is SEt then do;
set A:1 to shew reject;
set B=10000C tc show device busy:
ena~le interrupts;
exit via D. 14C;
end:
if A=1 ~ead) the~ do;
load B from PRIOR;
load buffer address into A(LAI+2):
ccn'vert to byte address and sa ve in PBU!R:
load read length into I(LII+3);
copy in to PLt;
,
negate and save in PLENG;
load request parameter (LAI+O);
isolate bits 8:6
and align tc A register 2:0;
merge A int c EPL'G;
set PFLAG bit 15 to show driver 'busy;
clear PFLAG tit 12'to show no
data yet read;
set EOT word 2 tit 15 to show EQT busy;
set PEOrL tc -80 for possible EOF detection;
JSB to R.14C to start read operation;
clear A to shew r~ad started;
enable interrupts;
exit via D. 14C;
end;
,set 1=1 to show reject;
set B=O to show illegal request;
enatle interrupts
e xi t vi a D. 14C:
8.14C:
RSS if D.14C in ccnttol via .IOC. call;
( i f t . 1 4 C inc en t to 1 'I hi 1 e I.' 4 C act i v e) i
J l1P TO R. 1 4 E
J5B to FSTC;
call .L!S. with '~lQE;
disable on return from .LTS.;
return;
4-5'1
R.14E:
10ao address of PIOC into A;
load address of PSTC into B;
enqueue PSTC to PlOC;
ret urn;
1.140:
JSB to I. 14C;
disable 1nterrupts; sav~ registers;
move address of I.140 to PEXIT;
clear PSTC flag fer power recovery;
q~nerate address cf associated TQE in register A;
call • LTC. to can eel timer, and dis,able interrupts cln ret urn;
load contents of I.14C into Band decre.ent B;
load address of PINe into A;
enqueue 1.140 stotage to PINQ;
if not first st~rage enqueued then do;
restore registers;
exit using PEREI to restore
interrupts and exit via PEXIT;
end;
mOVE PEIIT to I.'~;
change RSS at B.1LC to nop;
I.14C:
E.14C:
enatle interrupts;
load address of enqueued I.1L~O storage (PINQ) i
e~tablish contents of indirect pointers;
issue etc to ackncvledge in terrupt . (PCLC) ;
ifEFLAG; bits 9:8=1 or 2 then go to E.14C;
if PFLAG' bit 0 is set then do;
use PLIA to lead datum;
load B from PEUPR:
store byte frel A via B and store 8 into PBUFR:
increment PLENG;
if zero then go to E. 'L~C;
JSB to B.14( fer next frame:
go to F.' 4C ;
end:
else do:
use PLIA to lead datum;
if PFLAG bit 12. is cle.ar
increment PEO~L:
if
an~
A=O then do;
then do;
set PFLAG tits 10:8:
ze~c
ge to
E~14C;
end:
J 58 . t c· B. 14C;
go to F. 14C;
end:
if PFLAG bit 2 is cleat then do;
4-52
calculate number of bits in 1:
if eVED and PPLAG bit 1 is set
or if odd and P1L1G bit 1 is clea~
then do;
set PFL'IG bits 9;8;·
er.d;
,
.ask A to SEven bits;
if A=carriac;e return then go to E.14C:
i~ PFLAG bit 14 set then do;
JSB tc B.14C:
go to p.1L1e;
en ti ~
if 1=0 \.. ,\ ~17 ". ua2.~
t hen do;
JSb 't.!: E
....
go t.\l F.14C;
..: 1=177
end;
if. 1=30 th-9D do;
restate criqina 1 length;
set o~iginal buffer point9r:
set PPtAG bits 14 and 13;
JSB tc B.14C;
go to P.14C:
end:
if 1=10 thaD do;
reduce length;
reduce buffer pcinter;
JSB tc B.14C;
go to P.14C;
end;
'load 8 from PI!UPR;
store byt~ from A and ~9store B to PBUlB;
set PFLAG bit 12 to show data read;
increment PLENG;
if zero then de;
s et P P LAG bit 1 4 ;
end;
JSB to B.14(;
go to P .14C ;
E.14C:
load PFtAG into A; if PFLAG bit 13 is set
then do;
clear PFLAG bits 14 and 13;
JSB to R.14(;
.
go to P.14C;
end;
isolate bits 10:8 of A into bits 2:0 of A;
if A not 0 then SEt A bit 14;
'i-53
store A into EQT status word;
add PLL and PLE~G and move to
EQT transmission lcg:
move PREQT to .BD!P:
JSB to .BDPR with return to F.14C;
P. 14C:
G.14C:
disatlE interrupts:
dequeue 1.140 stolage from PINQ;
if PINQ not empty then go tc B.14C;
dequeue PSTC from PIOQ;
if none then do;
restote RSS at R.14C;
restote registers;
exit using PFREI to restore
int~r~upts and exit via I.14;
end;
JSB to the dequeuEd PSTC;
call .L1S. to stalt associat~d timer;
disable.on return frcm .LTS.;
qo to G. 14C;
T.140:
'I.1QC:
P.140:
P.14C:
JSB to T.14C;
use TOE address tc generate add~ess of
a'ssccia ted SFS;
execute SFS;
if flag set then exit via T.14C;
generate address cf PFLAG;
'set PFLAG bit 8;
genErate address cf FSTC and execute same;
generate address 'cf PSTF and axe cute same;
exit;
JSB to E. 14C;
set PFL.AG bit 9;
if I.140 not 0 thEn do;
set E=-1;·
load ILIA i~to A;
call I:. C" 1;
exit;
end;
if PSTC flag = zelC then exit;
load PSTC instructicnj
change to STC (no clear flag) :
execute in-line;
exit;
III. De sign Str uct ur es
4-54
. .£l~
.
Any current. operation is aborted.e
The ariver enters an idle,
availacle stat E •
. JSB
OCT
A record
• IOC.
. (xx=logical unit
OOOOxx
is
read
frcm
paper
~
taps and transferred to the
supplied buffer.
JSB
{)CT
JMP
DEl
DEC
• IOC.
010nxx
(x:x.=logic·al unit ')
. ·REJCT
BUFFR
III
m=positive numter of frames to be read
n=O - even parity ASCII mode
, - transparent mode
2 - odd parity ASCII mode
4 - no parity ASCII mode
~~~~ In~~!~Si~n
The returned transmissicn log is al~ays equal to thE number
of data. frames read. The status word includes these definitions:
14 -
~rror
2: 0 - 0 no errcr
1 reader not
rea~y
2 power failure
3 parity error
7 ~nd of file
~-55
~~~]t~Qn_An~~nction
The reader/punch/intar~reter handler (RPm aanages all I/O
for .th~. reader punch driver.
It may be activated by other
handlers to read cards,
~unch
cards, or print on cards. When
activated by the ASCII files handl~r it may be used for both read
and write operations. When activated by an RJE module it will be
used either as a card read~r handler or a card punch handler, but
not both simultaneously.
The handler supports the reading of cards·in column binary,
ASCII, or EBCDIC. It supports punching cards in Hollerith or
column binary.
The handlE~ is written as a serially reusable
module~
It is a level 3 functicn handler and r~sponds to the
defined level 2-level 3 protccal.
InlU!.a c ing
RPH has one input qUEue fer all werk entries.
may appear on the input work queue:
received
frol
a
level
2 handler.
These commands
1.
Start
handler •.
Activates 1:be
2.
Read - received from a level 2 handlar.
buffer to rEad a card.
The handleI uses the
3.
Write - received frc. a level 2 handler.
data to be punched and/cr printed.
The buffer contains
4.
Control
buffer.
s.
stop -·received from ~ level 2 handler and causes the handler
to begin termination precessing.
6.
Retry - 'received fro~. a level 2 handler and causes
handler to retry the reed or write operation.
7.
Purge
received from a l~vel 2 handler. A clear call is
made to IOC' tc purge any outstanding.I/O requests.
8.
Allocated buffers
received from the buffer .anager in
dp.layad response to a request for a buffer.
received from a leval 2 handler in a contl:ol
It contains a PCP code in the data word.
4-56
th~
The following commands lay be returned to the activator:
1.
NOP
a completed write buffer is being returned to the
caller-, or an allocated buffer is be~ng sent to
the
activator.
2.
write
caller.
3.
stop - the received step cell.and is being returned following
the completion of all outstanding I/O requests.
4.
Error
an
occurred •
.L.2~1
a
cOllpleted
read
indication
that
buffer is being returned to the
a
read
or
vrite
error has
,ga ta ~!"~n~
The
star~
co ••and is defined by the following SCi vords:
SCW vord 2 -
Bits 13-8 stream identifier
sew vord 3-- Bits 14-0 activating
hand~er
queue nal.
SCW vord 7 - Bits 15~0 tuffer length
BCi vord 8 - sit 1S
start for read only or write only
1-0
(BJE lIode)
.
read lIode (if bit 1S on)
CO=lSCII
C1 a cclumn binary
10=E BCDIC
Data word 1 - Bits 15-0 number of buffers
Card images returned tc the activator have the follvcing
definitions:
sew
Bew vord 2 - Bits 13-8 stream identifier
3-0 co IIlIand=1
~ew vord 7 - Bits 15-0 number of data bytes
Cexcludinq trailing blanks)
Bew vord 8 - Bits 15-2 unused
1-0 (O=no err~rs
11=end Of( file
For the error command, BCW2-bits 13-8 contain the streaa
identifier and BeWS-bits 1-0 contain the general error type.
Ths following define indirect pointers to local data:
tQE
TOE
ONA!E RPR
queue name
4-.57
activating handler gueue name
read IOC para
vri te I CC par a
con trol ICC parm
STAT
error status
STID stream ID
RLEN read length
BUFFR buffer address
STOPB stop buffer address
ACTBC active read buffer count
.
FLAGS flags
bit 15 not ready error condition
'4 purge act i ve
l' stacker salectior.
10 hopp9r salecticn
o 1= RJE mode
O=TSB mode
AHQR"
RIOCP
WIOCP
CIOCP
Tha readsr/punch/interpreter handler has four entry points:
·RPHHI - handler initialization, invoked by ..
~ ystem initializa t~on
BPHMP -
rec9ives control from sy~tell dispatcher
when ~ri.ed by 2ystea queue manag~r
RPHHC - receives control from system dispatcher
when scheduled lead, write, or control
operations have completed
RPTAP - receiv4s cotnrol frem the time base 9~neratcr
handler when a tiDIed paus~ expires (for
rEad or write retries follcving not ready states)
The following
module detail.
"structured"
dascription
provides
internal
RPOHI:
poin~ fer initialization section.
JSB to commcn code (RPHHI)
return through ~ntry point
RP HMI:
initialization section of 'common code;
if restart, returr.; if start, merge logical unit
number with icc calls; use • FIND to deter.ine queue
name; exit;
entry
4-58
BPOHP:
BPHHC:
entry point fer prime section;
return.through entry point;
J5B
to co •• on code.
prime seetien cf com.cn code.
establish addressing for local ..storage: .
chec,k work. queue;
.
if no vork, exit via .coe.
else; if queue vas purged,
use PiGE5 subroutine to clear device:
exit to ec.mutator:
save vork ettry addre SSt
use co •• and type to enter appropriate
routine (STAB~, REID, WRITE, CHTRL, STOP,
PURGE, BETSY, ALLBP)
START:
STBUP:
BEAD:
routine to tandl~ sta~t co.mand.
save strea. ID;
save activating handler gueue naae;
if read only mcde or v~ite only, indicate IJ! .ode:
set default aodes for stacker 1, hopper 1:
set Rclleri th punch II ode;
set BEeDlC read .mode;
set tc Funch, ~rint saae data
iss ue control IOC call to set stacker
ove If Ie v mode;
continue STABT processing at STBUl
it read/write .cde" indicate TSBmode:
s~t default aodes for stacker 1, hopper 1,
set ASCII read mode;
set Hollerith punch mode;
set to punch, print same data;
issue centrol IOC call to set stacker
sal Ect .ode;
acquire but fers:
give to actiYating handler as ROP;
free start bufter;
exit to comautator;
rEad command processing.
create IOC ~ar. from flags and read .ode;
zero out read buffer;
issue IOC call.
indicate read buffer active;
exit to comlutator;
WRITE:
write command processing
if RJE mode, get panch mode fro. buffer;
4-5'9
else get putch mode ftem write IOC par_,
create IOC ~arm with flags and punch mode;
iss ue I OC c a 11 ;
exit to comrutator;
CNTRL:
control COM rand processing.
illl me d fa t e type con t IO 1, 59 t mod e ;
free control buffer;
. exit to commutator;
else; set u~ centrol call to driver;
issue IOC call;
free ccnt~ol buffer;
exit to commutator;
i f
STOP:
stop command FIocessing.
purge tim~r if running;
if read buffers active, issue CLEAR IOC call;
else; issue clear wait station IOC call;
indicate step in progress;
save addrass of stop buffar;
exit to ccmlutator;
RETRY:
retry comma nd . processor.
start a ti lIer;
free retry cemmand buffer;
exit to ccmlutator;
PURGE ::
purge command processing.
purge timar if running;
purge deviCE rEquest queue;
£r96 purge ccmma~d buffer;
indicate purg~ processing;
exit to ccmautator;
ALLBP:
allocated buffer processing.
if no longaI running, frea the buffer:
elSE; if cCttrcl buffer; use for error report to
activating handler;
else; give to activating handler as NCP;
exit to comlutator;
!he following modules make up the I/O complete section of the
handler.
,RPOHC:
entry point fer I/O
~SB to commcn.code;
f?nd;
4-60
ccmplet~
section.
i
RPHHC:
I/O complete sEction cf common code.
est.ablish addressing for local storage;
if call was clear wai t station, 'then:
return step buffer to activatinq handle~;
exit to commutator; .
if call vas read, enter CREAD:
else call was write;
CiRIT:
handle writE cc.plete.
if no error, return to activating handl.r as HOP;
else; save tuffer address;
it first tile, then;
turn cn error flag;
send error co •• and to activating handler:
issue priority IOC call with samE buffer;
exit:
else; start timer;
issue priority IOC call with saa. buffer:
exit:
CREAD:
read ccmplete.
decrement active buffer count:
if stop in Frogress, give buffer to activating
handler as HOP;
else; check status;
it no error; give buffer to activating handler:
turn eft error flag;
exit to cc.mutator;
else; handle error:
if first tile or Eor. send error co •• and to
activating handler;
exit to cc •• utator;
else: do start timer;
pat beffer back cn handler's queue:
exit to commutator;
BPTAP:
ti.er appendage.
establish addressinq for local storage;
issue release IOC call to release request gueue;
ret urn i
ha~dle
10
4-61
I.
Product Identificatio,n
.f~od'y£.!: Ab.§.tt~
this drive~ is designed fer use with the HP2000 ACCESS system
to support the HP12989A. readEr/Punch/int~rpreter subsystem.
Th~
module is written in a serially reusable manner in order t~
support mUltiple (up to 7) reader/punch/interpreters.
II.
Design 0 v er 'Ji ew
.Q~.2i!Ul !§§J!m.lllQ.~
'This dri ver assumes. a 2100 or 21M X ser ies compu tEt and the
HP2000 ACCESS Fi~mware optiot (13206A or 13207A)~
T~e
reader/punch/intar~reter driver consists of two separat~
modules, 0.340 and D.34C.
the 0.340 modul~
contains .the
initiator, continuator, and ~ower recovery entry points and all
~otentially
volitil~
lccal
storage
for
a
given
reader/punch/inter~r~~er.
Cnly this module must b~ replicated to
sUFPort additional devices. The other module, D.34C, ccntains the
actual driver code and is used as a subroutine by all copies of
0.340.
The
follc~ing
D.3~
driver is·a lead/write driver and will support
th~
functions:
Clear-
any card in the visibla wait statio~ !s ejected
to the selected stacxdr and the device status is
cleared.
Read-
Cards may be
bin ary form at •
Write-
Control-
read
in
ASCII, EBCDIC or column
. cards may be pl1nch . ~d in Hollerith or column
binary format. ASCII data may be printEd on the
top edge ef th~ card.
The. print data may be
different fter the punch da~a.
control operations supported are
-feed a card frem selected hopper
-s~t stacker sel~ct mode
-sat stacket overflow mode
-clear th~ .visible wait station by ejecting
ca.rd to selected stacker.
4-62
The power recovery routine allows for. the proper termination
of any read/write operations that were active at the timE. of pover
failure.
.
Th. error handiing se~tion provides for the detection of
empty hepper, full stacker, ·data conv'9rsion errors, pick fail,
·eject fail,
er not ready conditions. The oecurrance of a ' : : '
sequence in columns 1 and 2 cf a card is treated as end cf file.
The driver is written in a ser.ially reusable lIanner. That
is, one copy of 0.34C serves multiple cepies of D.340.
Access to
local data storage for each dEvice is through an indirect pointer
list. Int9rru~ts from multiple devices are queued and handled
serially by the driver.
D.34C contains code for the initiator saction (D.J4C), the
continuator SEction (I.34C) and the power recovery
section
(P.34C).
In the initiator section, the call paralleters ara
analyz9d, initial conditions are established, and a read, write,
or control operation may be initiated. Because the initiator
secticn may b~ entered from tase level programming (.IOC.) or the
continuator sEcticn (.BOFR), the initiator s@ction is entirely
d.isabled.
'
I.34C, the continuator section, consists of three ~arts. The
first part, which runs disabl6d, 'queues the interrupt for service.
If this interrupt is the first to ba qua ued, the second part is
entered. otherwise, an exit is made immediately.
In the second segment cf I.34C, the interrupt is handled. A
1etailed description of the interrupt handling process is given
belcw.
When interrupt serviCE is compl~t~d, the third segment is
entered.
In the third segmer.t, which also runs disabled, the storage
block 1ust serviced is remOVEd from the queue.
If aorE storagg
blocks remain in the queue, the second segment is ente~ed again.
Otherwise, an exit is made from th~ original interrupt.
The
P.34C
section
is
entered
fot
each
reader/punch/interpreter d~vjce at powar recovery time.
If the
assocaited I.340 section was active, 0.041 is entered to restore
th~ condition.
If the intartu~t secticn was not active, but an
... 4-63
operation had. been scheduled,
I.34C to effect recovery.
an
interrupt is forced to cause
!!2g'y!~ .Qn~iL
The follcving define the indirect pointers in D.34C used to
access theloc~l data in D.340.
EOT!
BUFP
BDU PF
NLEN
LNGTH
PPOFF
IOREQ
FLAGS
CHAR
STCL
STCH
CLeL
CLCH
LIAL
LIAH
OTAL
OTBH
PSTAT
EQT addr4?ss
tuf fer addr ess
byte addr~ss cf buffer
ne,gative read/write length
original reguest length
print/punch buffer offset
I/O request word
, d ri ver f la 9 s
bit 15 driver busy
14 sta cter mode
=0 stacker select mode
=1 stacker overflow mode
13 write operation started
12 feed after write
1 1 first input character read
10-8 not used
7 inhitit input
6-2 not used
0-1 rl3ao/punch mode
=0 ASCII/HollsIith
=1 Colu~n Binary
=2 EBCDIC
first input character
SEt control instructicn for low select code
set control instruction for high select code
clear contrel instruction forlov sel~ct code
clear contrel instruction for high' select code
LIA instructicn for lew select code
LIl instruction for high select code
O!A instructicn for low select code
OTB instructicn for high sel~ct code
pseudo status verd
bit 15 not rEady condition
14 sta cker full
8 hOPF~r 1 ~mpty
7
hop Fer 2
~m~ty
st~tion
o card in. wait
POJ?T
SSTC
print/punch options fer write request
STC subroutine with power/fail instruction
4-64
The following define data specific to D.34C
SQAoR
IQlDR
. TEMP1
TE!P2
TEMP3
Queue for S1C instructions
Queue for interrupts
Temporary
storage
.for conticuatcr Section
The. following
modul@ detail.
0.340:
"structured"
d~scription
provides
internal
entry poin~ for initiator section.
Jsa to commcn initiator code D.34C:
The following
co •• on code.
modules
make uF the initiator section of the
D.34C:
entry into initiators9ct~on of co ••on code.
disable interupts; save EQT address;
save EOT pointers;
establish addzessing for local data:
establish rEal return address and
save at D.34.
get user reguest code;
if clear, ecter CLEAR routine;
if driver already busy, then;
set bit 15 in B-reg;
enter REJCT;
set to i900[e int on low channal;
save requ9st code status;
if read raqcest, ente~ READ routine;
if write request, ent~r WRITE routine;
1f control teguest, enter CNTRL routine;
indicate reqUEst code reject (B=O);
REJCT:
indicate re Ect return (A=1);
enable intetru~t;
exit;
READ:
routine to start the read operation.
JSB to aWSTF to s~t up initial conditions;
zero the transmission log;
if device ir.put buffer is full,
set to handle interrupts on data channel;
use LIA subroutine to read first character;
save at PRCHC;
indicate character. read in driv~r flags;
.issue STC,C on low channel;
4
4-65
taka tormal exit (NEXIT):
use FEED sutrcutine to feed card:
if +1 return frcm FEED, take hot ready Exit (NRED!)
if +2 returt, take normal exit (NEXIT)
WRITE:
routine to initiate punch or print operation.
use RWSTR subroutine to set up initial conditions;
copy write length to transmission log in
case immediate r~turni
.
if punch re~uest, set to eoable punch;
if print reguest, set to enable print:
if separate print/punch data, set SPD bit,
save print/~unch options;
.
if card in ~ait station, then;
set B-reg with print/punch options;
indicate write started in drivar flags;
skip text instruction;
clear B;
use FEED sutrcutine to start operation;
if +1 return, take not ready exit (IKRET).
if +2 return, take normal.exit (NEXlT).
B WSTR:
subroutin~
to set up initial conditions
for read or write operations.
get buffer address and save (RPBUF);
get buff€r length and save (RPLEN);
negate and save for count (RPLNG);
get 10 request vord and save (RPREQ);
make driver busy (EOT and driver flags);
return;
eNTBL:
routine to handle centrol requests.
get subfunction code;
if feed reqte~t then:
JSB tcFEED subroutine;
take net ready exit (IMBET):
skip return--take normal exit (NEXIT):
if clear walk station [equest, then;
entet EJECT
If!RET:
subroutin~:
not ready exit(IMRET):
take tOImal exit (NEXIT);
~f set stlck.r select mode, then;
set iridicator in driver flags;
if set stacker cverflcw mode, then;
set indicator in driver flags;
set bit 15 jn A-reg, clear B=reg;
enablA inta~rupts;
exit:
tak~
NEXIT:
clear A-reg:
enable inte~ru~ts;
exit;
~LEAR:
routine to handle clear requests.
zero transmissicn log:
use ST1TS subroutine to get device status;·
if + 1 r etlt~ 12 bec:a use not read 1', then:
issue etc to both channels;
clear status in EQT;
.clear d~vice flags;
"exit via 0.34;
use EJECT subroutine to eject card;
exit via D.34;
exit via 0 • .34;
EJECT:
subroutine to ""
the visible wait station;
·set to inhitit input on fged operations;
clear B-reg;
enter FEED sutroutine;
rEturn;
increment return address; return;
The follcwing are subrcutines used by both the initiator and
continuator sections of the common code.
PEED:
subroutine tc feed a card. When'
entered, the B-~eq'contains print/punch
options. A plus one return is made if
the device js not ready. Oth9rvise, a
plus tvo return is made.
enter subroutine MTINS to clear device
input buffet:
clear buffer full flag in data channel;
enter STATS subroutine to check status;
return if nct ready;
if stacker full, then return;
if selected hcpper is empty, . then return;
set command channel control word by
mergiIg B-reg with hopp~r/stacker
selection bits 'in IO request;
output word to command,channel:
enter FILL subroutine to fill a waiting
output buffer if necessary;
if in initiatcr section, then issu~ STet
else queue the STC request;
. increment return address;
ret urn;
4~67
f!i'INB:
EAt:
subroutine to empty the device input buffer.
use LIA subtoutine to read character;
if buffer elpty, return;
J!P to EAT to empty the buffer;
LIA:
subroutine tc read data channel.
read the low select channel;
if buffer elpty, return;
if data not rEady, JMP to LIlL;
else issue s~c to get more data;
issue CLC tc low ~elect channel;
return:
LIlL:
PILL:
FLUP:
subroutina to fill a waiting output buffer.
indicate fitst time through;
enter CKRD! subroutine to see if device is ready
fer comaandJ
.
return to caller on plus one return;
read da ta c 1':a nnel;
if device flag is set,
or first tile throuqh;
issue STC t c fill bu f fer;
J"P to FLUP :tc repeat;
to check the ready for command bit.
read the cOlmand channel;
if not ready, then increment retUrn addtess:
else return;
CKRDY:
subroutin~
STATS:
subroutine to check and update the device status;
read low s91ect channel;
if status net availabl~ then check high (CKHIS);
if input ChECk, then;
indicate not ready condition;
if read ch~ck, th~n;
indicate data error condition:
if hopper 1 empty, ~hen;
indicate hopper 1 empty; .
if output check, then;
indicate not ready condition:
if stacker full, then;
indicate not ready con1ition;
save low channel status;
rEad high select channel;
if hopper 2 P..~ty, then;
.indicate h~pper 2 empty
if card in wait station, then;
indicate card in wait station;
SK HIS:
4-68
if not ready, then;
indicate not ready;
merge low and high status;
update EOT status word;
if no not ready condition~ then increment return
address;
return;
The following routines lake up the continuator
section of D. 34.
1.340:
entry point for ccntinuator section.
JSB to ~ommon continuator code (I.34C);
I.34C:
entry point into continuator section of common code.
disable interrupts; ~~VC r~qisters;
indicate interrupt received in local data;
queue the interru~t;
.
if ~ot ~irst on q~eue, then;
g.et return address:
restore raglsters;
exit with enable;
else set up returt address for exit;
set switch in FEEt and LIA subroutines to
indicate continuator in control;
I.GO
establish addressing f~r local data;
establish EQT poitters;
enable interrupts;
set for no interrupts on data channel;
gat 10 request ~otd;
if completion frou CLEAR,
go to I.END;
if cOMpletion fret CNtRL,
go to I.END;
if completion froD WRITE,
go to IWRIT;
else completion flC~ READ;
tREAD:
handle read interrupt.
if read cclumn bitary rEquested, then;
if first character already in,
IRCBI:
us~ subroutine WRISZ to store character
and ircrement ccunters;
US9 CELIA subroutin~ to read character;
I HC Bt:
use WSISZ subroutina to store character
and increment counters;
JMP I ~CBL to loop un til done;
'l-69
if ASCII read requested, then
set ASCII ccnversion tabl~ address;
enter IRASC rcutine;
if EBCDIC read reguEsted, then
set EBCDIC ccnversion table address;
enter IRASC rcutine:
IRASC:
subIoutine to rgad ASCII or EBCDIC.
change buffer add tc byte address;
if first characteI already read, skip
over reading character;
IRASL;
usa
use
use
and
JMP
IREND:
routine to complgte"read.
use "TINB to empty buff~r if necessary;
put • of characteIs less trailing blanks in transmission log;
enter I. BU"FR;
go to I.END:
IWRIT:
routine to handle write interrupt.
if feed before write, then;
set print/pcnch options (PPOPT);"
enter FEED sutroutin€ to start write;
go to I.END;
if ~rite completicn, then
set t ra n S IJ iss i c n log;
s et E QT s tat us;
go to .BUFR tc complete writ~:
go to I.END;
else set temporary counter to -80 for punch operation;
if punch tinary request, then
set print buffer offset to -80;
gat buf fer address;
lead data vctd;
output to device using OTA subroutine;
increment btffer printer;
use CWISZ subroutine to count down;
lcop until dcne;
else for ASCII punch;
set print buffer offset to -41;
convert buffer address to byte address;
get character from buffer;
US9 CATCH subroutine to convert character;
subroutine CRlIA to read character;
ACRT or ECVRT subroutina to convert character;
BRISZ subrcutlne to store character
increment counters;
IRASL to loop until done;
4-70
output character~
use CWISZ to count down;
loop until done;
I.CND:
~ake
I. ENC:
dis.atle system;
rellove storage blcck from queue;
if queue not empty, go to I.GO;
else; dequeue pending STC;
if any on. STC queue, then;
issue the S1C;
check for mere entries on STC queue;
else;
I. DOH
restore req~ests;
exit with enable;
end
driver not busy; clear. driver flags;
The following subroutines are used by the
routines.
r~ad
CRLIA:
subroutine to get character froll device input buffer.
use LIl subroutine to read character;
if data present, then;
return:
else; enter IREND to complete read;
BRISZ:
routine tc store character and increment counters.
store the byte in user buffer;
increment charactEr count;
ret urn;
iiRISZ:
routine to store word and increment counters.
store word in US9r buffer;
increment buffer address;
increment charactEr count;
return;
ACVRT:
subroutine converts to ASCII •
if blank, load oASCII tlank: return
else convert card cclumn punch to ASCII;
if illegal punch, thEn enter IROCK;
indicate significant character;
ret urn;
ECVR 'I:
subroutine converts column binary to EBCDIC.
if tlank, lo~d EBCDIC blank; return:
else convert to EBCDIC;
if illegal, then Enter IRDeK;
count significant character;
ret urn;
IRDCK:
use ~TINB to clear device
set status in EQT;
in~ut
buffer;
GO TO· I. BFR;
The following subroutines are used by
th~
write routines.
CiISZ:
subroutine to coutt dcwn on punching.
increment count of characters;
~ount down usirig ~rite length;
when done, return plus one; else return plus 2;
OTA: .
sucroutine to out~ut charactor.
out~ut character to buffer;
read data channel;
if not ready, loo~ until ready;
else execute STC instruction;
return;
CATOH:
subroutine to convert ASCII to Hollerith.
check for nor.-valjd character;
if not valid, set to output blank;
Rlse get Hollerith from table;
return;
WFILL:
.
routine. entered at End of punch.
fill up output buffer if necessary;
if separate print· data requested, then:
get buffer address:
add print data cffset;
ccnvert to tyte addr~ss:
. set temporaty. counter to -80; ,
output. byte;
loop ~n out~ut until dene:
disable interrupt;
. indicate feed after wri~e:
go to I.END;
The following is a descIiFtion of the
recovery routine.
P.340
entry point for pcwer
JSB to P. 34C;
r~covery
4-72
po~er
routine
common code for pcwer recovery routine
P •.34C
qet and save return add~ess;
get address of interrupt entry point· and save:
qet.address as. STC instruction and save;
get address of STC flag .and'· sa va;
if interrupt section was active, then
enter D.04? tc restore condition;'
exit;
if STC instruction was-executed, then
issue STC' instruc~ion to caus~ interupt
exit;
I I I . Design
structures
!ns!I:~~! ~e~Ii21i2D
,ge~~
Any current operation is aborted. Any card ~n the visible
wait station is ejecte.d to tte selected stacker.
Device status
bits are cleared ~nd the driver ente~s an idle state •
JSB
OCT
• IOC.
OOOOxx
xx:logica~
unit number
.is.I~
A card is read and transferred to the supplied buffer.
Optional data conversion may occur. If the device read tuffer is
full (card was fed by previcus operation), no card movement takes
place. Otharwis~ a card is fed from the selected hopper. If the
device read buffer is ~m~ty, but a card is in the visible wait
station, it will be ejected to the selected stacker wh~n the next
card is fed.
~he
JSB
• IOC
OCT
JMP
parameter word
REJCT
DEF
BUPFR
parameter
Bit 15
14- 12
'1
~ord
is defined as follows:
queued request
function
=1 read
stacker selEct
=0 stac ker 1
4-7..3
=,hopper
stacker 2
select
10
9-8
7-6
=0 hopper 1
=1 hopper 2
not used
read mode
=0 ASCII
=1 column binary
=2 EBCDIC
5-0
unit refErenCE number
!.Iil!.
Data is punched and/or ~rinted on a card. The punch data may
Hollerith or column binary fermat.
The print data aust be
ASCII format.
The pririt/pcnch data may be the same or different
data.
b~
JSB
.IOC'
OCT
parametEr vord
J"P
REJCT
DEP
BUFFR
The parameter word is defined as follows:'
bits 15
1"-12
11
10
9
8-7
6
5-0
queued requ Est
Function
=2 write
stacker select
=0 stac ker 1
=1 stacker ~
hopper selec't
=0 hopper 1
=1 hopper 2
not used
punch/print o~tions
=00 punch,plir.t same data
=01 punch only
=10 print orly
=11 punch,ptint separate data
punch mode
=0 Ho11 eri t t
=1 column binary
logic~1 unit nu~tEr
The control request is used to perform special
4-74
functions and set device modES.
JSB
• laC.
OCT
JMP
parameter word
RBJCT
The parameter word is defined as follcws:
bit 15
14-12
11
10
9
8-6
5-0
queued rE'quest
. function
=3 control
stacker sglEct
=0. stac kar 1
= 1 stacker 4
hcpper select
=0 hopper 1
=1 hopper 2
not used
subfunction
=0 feed card from selected hopper
=1 enable stacker control mode
=2 enable stacker overflow mode
-3 clear visible wait station
logical unit number
On a read operation, the t~ansmission log contains the number
of card columns read l~§~ trailing blanks. On a write cperation,
the transMissien log contains the number of characters printed
and/or punched.
Th~
status word is defined as follows:
hits 14
2-0
error
no error
=1 not ready condition
hopper e D);:ty
stacker full
pick fail
eject fa i1
=2 data convetsic~ gtror on read
-= 3 power fa il
=7 end of fjle
=c
4-75 ...
Serial Link Terminal Hdndler
DescriPtion and Function
..
.,-~---~
The Serial Link Terminal Handler is responsible for normal
flow of input, output and control rp.quests to the Serial Link Terminals
and notification of its caller of error"and completion conditions.
This handler 15 written in a serially-reusable manner.
In order to simplify the addition of new terminals to the system, the
handler is composed of two separate and distinct modules. The first
module contains the unique entry points and local data storage for a
given terminal, so that ~hen another terminal is added only this code
is replicated. The second module is the serially-r~usable code used
by all copies"of the first module.
This handlerarlheris to tne defined levet-2 level-3 protocol.
Interfacing
1,TH
accepts these work entry
comm~nds
START -
received from a level-2 handler In a control ouffer
It dctivates the handler.
wHITr. -
received from a level-2 handler in a d~ta butter. Contains
a line of characters to oe output to a terminal.
READ - received from a level-2 handler in a data buffer. Causes
LTH to obtdin data or intormation from a terminal.
received from a levpl-2 handler in a control bufter. Causes
the handler to begin termination processing.
STOP -
BUFFERS - received from Butfer r-tanager. TheSe are
"
bufters which ~ere previously requested but not available
at the time of the request.
~LT,OCATI::D
STAHT
R~TRrES ~ received from a level-2 handler in: response
to error notifications. Causes th~ handler to restart the
erroneous operation after a cause.
TIM~D
P II H(; F -
r e c e i v ~ tj t r 0 i'1 ale vel - 2 han 1.1 1 e r ina con t r 0 1 but t e r •
Causes all outstandinq reouests to be purqed and stares
termin~tion processinn.
4-76
CONTRU[t OPERATIONS - received from level-2 handler in a control
buffer. It is used to initiate special control operations
on the terminal.
LTH returns these commands to its activator :
Nap
- an allocated buffer, a .completed write or a purged data
b~ffer is being returned.
WRITE - a completed read 1s being returned.
STOP - the received stop command Is returned following the return
of all data buffers and de-activ~tion •
. ERROR - a notification that an error has occurred is sent.
Local Data Structures
--------------------The buffer in tne input queue
are defined as follows :
START command :
13 - 8
3-0
Bcw-3 Sits 14-0
SCW-7 Hits 15-0
Be vJ - 2 B 1 t S
Data word-l
stream identifier
command code (3)
activating handler queue name
ouffer length
number of buffers (1)
WRITE/HEAD commands :
Bcw-2 bits 3-0
BCiN-7 bits 1S-0
commana code (lor 2)
lenqth of data in characters
CONTRUL commands :
BCW-2 bits
3-0
Oa'ta word-l
command code (tj)
control function code
The buffers 1n toe outout queue dre defined as follows:
tlRITe: type
HCW-2 nits 13-8
3-0
HCW-7 Bits 15-0
HCtJ-8 Oits 15-2
1-t)
HC~~-2
.
Bits
HCW-~
Bits
.
BCIJ-2
aits t3-8
ERROR type
NOP
13-8
3-0
1-0
stream identif.ier
command code ( 1 )
number of Characters in but fer
unuseci
no error (0)
stredm identifier
commano code (6)
error tvpe
type
3-0
STOP type
bC~-2
..Bits
13-8
3-0·
stream identifier
code (0)
COffil'i'dnd
stream identifier·
co:n:nand code ( 4 )
4-78
These symbolic painters to local data are used :
TEHMA - address of terminal on Serial Link
TALKA - addre~s of ~urrent input unit
bits 15-14
not used
13-5 : terminatinq mode of special keys
4-0 : input unit address
STATU - status at terminal
bits
15: terminal busy
14 : powe~ f~il occured oM requeSt
13-3 : not used
2-1 : input completion type
o : service requested at terminal
LIGHT - state of prompting lights on terminal's display
CO~FG - configuration options
bits 15-9 : not used
8 : HPIB lstrument option present
7
CP" unit state
6
C f\
. I.i t ~ .... , .~ ~ ~ s '
5 : no t ;~ :' e \J
4 : Card/8adge reader option present
3 : Printer unit state
2. : Printer option present
1 : Display unit state
LUN
- .IOC. logical unit number
QUENM - 'name of associated work queue
AHQUE - name of level-2 activating handler
stream identifier
SID
FLAGS - internal loqic conditions
bits 15
(REQOH) request In progress
·14 : (ERFLG) error' detected dur Ing command
13 : (CT8EX) control expected back
12 :- (INPEX) read da ta expected
11 : (PRI~X) print of data expected
10
(RD[EX) read status information expected
9
(STDUN) status request In progress
8
(SRION) service request identification on
7 : (PFAIIL) power failed during command
6 : (IBCEX) HPIS command expected
j
:
(tITEX) llqht numbers expected
2
(RESTO) environment being restored
1
(AUTRO) automatic read selection in effect
o : (PUGRQ) termination procedure in progress
BYTEI ~ information status byte
"
bits
15: type of information (address or status)
14-6 : not used
5-0 : informa,t ion part (address of uni t or status)
TCTBf _. control buffer address for use in delegation of control
tHl !-" f P. - t1 e ~ dot wa i t que u e
STO~B - tail ot wait queue
TOE
- timer Queue elements
Algorithm
LTH has four entry points :
(JTHHI : "handier initialization" : invoked by system initialization
module. It issues a call to Fr~D routine tor its own
queue name. The queue name is retained In QUENM and will
be needed for issueing GETQ requests.
LTHHP : "handler priming" : receives control from System Dispatcher
when .primed by system Queue Manager. PADDS is used to
qenerate a list of indirect addresses for access to the
loc~l storaqe ~rea. Initially tne handler 'is in an idle
state. It is removed from this state by b~ing
primed with a START command containing the queue name
of the level-2 activatinq nandler. All other commands
are accepted following the START. PURGE, START-TIMEDPETRY and ALLOCATED BUFFER commands a~e processed as soon
as ~hey are received. READ, WRITE~ CONTROL and STOP
commands dre queued on the handler local wait queue.
If the wail queue is empty upon reception of a command
that command is immediately processed. LTH stays in t~e
active state until a STOP or a PURGE command is processed.
Then it returns to its idle state an~ a new START command
is needed to re-activa~e it.
LTH han dIe son e que u e en try a t a' tim e wrflnit i s p rim e d •
The queue entries are processed as follows l
START :
activator·s queue name and the stream
identifier are saved in AHQU~ and SID respectively.
The r~st of the local storage area is initialized.
The STAMT ouff~r 15 returned to the Buffer Manager
and one data ouffer of appropriate size is
requested from the Buffer Manager.,
Once obtained tnis buffer Is tised to issue an
IFe call to .IOC. which causes the driver to
initialize the terminal.
WRrr~
the data in the buffer is interpreted according
to the value of selected bits in FLAGS :
th~
a) if bit-3 1s set the buffer contains a list of
light numbers. The appropriate sequence of
requests to .lOC. is issued to correctly
position the prompting lights. LIGHT 15 updated
to r~flect the state of eacri liqht on the display.
oJ it 01t-4 is ~~t tne butter cont~in~ ~ list ot
specidl function keys. The appropriate sequ~nce
ot' requests to .IOC. is issued to correctly set
the terminatinq mode of th~ keys. SfKS is
4-80
updated to reflect the mode of each special
function key.
c) if bit-b is set the buffer contains an HPIB
message. That message will be decoded and emulated
according to its 'meaning.
d) otherwise the buffer contains ASCII characters.
An .IDC. call is issued to cause the driver to
print a line of characters cn the terminal.
READ;
if an input unit is deflned~ that 1s if bits 4-0
word are not all set to one a read request
is issued to enable the current input unit on
the terminal and start an input operation.
If no input unit is defined the read buffer 1s
used to issue a WAIT on SRQ request to IOC.
Then when the SRQ line goes LOW the address
of' the input unit will be d~termined and a
normal read issued to this unit.
~ALKA
STOP:
the data bufter containing the command Is used
to issue an'IFC call to .IOC •. which causes the
driver to reset the terminal to its initial state.
PUGRQ condition is set in 'FLAGS and any pending
operation Is canc~lleda
~
ALLOCATED BUfFER : the buffer may be a control buffer
or a datn butter. The control buffer is used to
send an error notification to the activator. The
data buf~er is used to issue an IFC call to
.,IOC. to cause the driver to initialize the
terminal. SUbSequ~ntly the buffer is made
interlocked. The stream identifier and NOP command
are placed in BCW2 and it is sent to the activator.
START TIMED RETRY : a timer 15 staLted and the buffer Is
freed. when the timer finally exits, the operation
at the top of the walt queue Is re-initiated.
PURGE: an IFC call ls issued to .IOC. which causes the
driver to reset the ~erminal to its initial
state. PUGRQ .condition 15 set 1n FLAGS.
CONTROL : it is used to perform special operations
on the terminal and its optional units. Those
special operations are emulated as a series of
write requests to the associated driver.
Control functions 11 to 81 are related to the
display, keyboard, prin~er, badge and CRT units
of a terminale At tne ~nd of the actual oper~tion
the control buffer is released by this handler.
Control function 70 is related to instruments
connected to a terminal via its internal HPIH.
4-81
Once a control request with code 70 has been
receIved the normal control functions (codes 71
to 81) become ineffective. The control buffer is
kept in TCT~f word for use i~ case at the HPIB
"deleqate control" command.
The CALL routine is invoked whenever a call to .JOC. 15
necessary. It prepares the required code sequence and
saves In word sews the address of the local storage area
associated with tnis terminal.
The IOeMO and IOCM2 routines format special co~mand
write requests to the driver (pure HP[B commands are issued
that way).
4-82
Ll'HHC
"handler lID completion" : receives control from System
Dispat,cher ',oIl"len scheduled read or write requests have
comoleted.
The address of local data storage Is found in word SeW1
of the returned buffer. PADOS routine is used then to
qenerate the correct pOinters to the local area associated
with the terminal. It PUGRQ condition holds, tnat is If
a PU~GE command has been previously. received" the butf~r
Is returned to level-2 handler as NOP (if a data buff~r)
or freed (if a ~ontrol buffer).
The followinq error detection/correction procedure Is used
when the error bit is set by the driver :
- If ERFLG is already on, that is If an error was
detected on that same operation during the
previous attempt, a timer is started for 1 second
and the request is requeued at the head of the
wait queue.
- otherwise ERFLG condition is set and a control
but fer is requested to notify the level-2 handler
of a type-2 or type-3 error condition. The buffer
is requeued at the top ot the wait queue and will
be reactivated when a timed retry 1s scheduled.'
If no error has occured the command type is analysed to
determine tne next ~ction to undertaKe~ One of the
following nay take place :
- the operation has not completed and the buffer
Is used to send the next request to the driver.
- the operation has, co~pleted and the data buffer
Is returned as NOP (if ,a WRITE command), as
WRITE (if a READ command) or as STOP (if a
STOP command), while the control buffer is freed
by this handlere If PUGRO condition hDlds the
wait queue is emptied and all the bufters returned
to the system . .
If the wait queue is empty control 1s passed to
the System Dispatcher. Otherwise, the top entry
of the wait queue is obtained and passed to LTHHP
section for orocessing.
r.THT:
"tirner-expiration tf section : receives control from the
time base generator l"landler when a timed pause expires
(for operation retries following not ready states).
Upon entry the content of the A reqister (address of timer
hlock) is used to qenerate the pointers to the local area
associated with tois terminal.
1'rl e b 11 t fer ~ t t n ~ t, 0 P 0 f the wa1 tau e u e i sob t a in e dan d
ads::»eJ to LT:if"!? for
re"'proc~ssinC:j.
4-8'3
Soecial cases
1)
Restarting a Read operation through the
SKQ
alarm button.
When the presence of an SRQ is sensed at ttle end of a Read request
the tollowing takes place :
- the SRQ is aCKnowled~ed
the terminal is restored to toe state recorded in
handler's local tables (lights, keys, in~ut/output units)
- the .read operation is automatically restarted.
If the requesr could not be acKnowledged at the beginning of the
procedure then d type-3 error is notified (operator intervention).
2) Power fail condition.
The handler receives"!n STATU an indication of the occurence of powertailures (it records this condition in PFAll. flag).
If at the end of an operation PFAlL condition holds, the following
takes place :
- the syst~m is notified of an error if the operation was
a read since one cha~acter may have been lost.
- the operatIon is retried if it was d ~RITE' of promptIng
light codes.
- the operation terminates normally in all other cases.
3) Instruments in use.
When a control function 70 has been executed the terminal is viewed
as a set of HPIH compatible instruments (keyboard is an input unit with
address 29, display Is an output unit ~ith address 29, ••••• ).
No recovery procedure is attempted in this case as tne handler does
not keep track of tne state Of the complete HPIR. The SRQ condition
is no lonqer Interpreted as dn input restart indication.
4-84
rIb PROCESSUR
DESIGN SPECIFICATIONS
0.53 S~RrAL LINK CONTROLLER DRIVER
HP 2000 ACCESS
BAS~
I. Product identification.
1.1 Product abstract.
The 0.53 Serial Link Controller driver Is designed for use
with the HP20l)O -Access System-.- It provides an interface for
input/output operations between an HP21MX series co~puter
and 3070 d~ta collection terminals connected to a 40280A
controller via a Serial Link.
The 0.53 driver will nandle up to 8 Serial Link Controllers
simultaneously ~hlth up t~ 31 terminals on each Serial Link
(the system will limit to 31 the total number of 3070 terminals
configured in the I/O processor). Transmission rates between
25 and 250 characters are supported by each controller.
II. Design overview.
I I . l Desiqn
as~uwptions.
The driver module assumes a 21MX series computer and requires
the HP2000 Access I/O processor microcode.
11.2 Design summary.
The complete driver consists of two distinct modules (0.530
and D.53C). The 0.530 defines the actual driver initiator,
continuator and power fail recovery entry paints associated
~lth any given Serial Link Controller. fhis is the only
module whicn must be replicated to support multiole controllers.
It includes dll data associated ~itt\ a specific controller
such as related 110 instructions,· list pointers •••••••
The D.S3C which contains the actual code is used by all copies
ot 0.530 to drtve the 3010 terminals controlled by a Serial
Link Controller.
-
4-e5
11.3 Design dporoach.
[1.3.1 Controller logic.
Although the Serial Link Controller is physically a single
I/O board, it may be viewed as a multiplexer for up to 31 data
collection terminals of the 3070 family.
The controller uses a polling technique to communicate
witn the terminals. A polling cycle consists- of a series
of elementary messdges conforming to the Serial Link Protocol
and cQnstructed from a table· of informations passed by the
driver before startin~ a cycle. The format of an information
word is desc~ibed 1n Table-I.
Upon the end of tt1e cycle the controller will interrupt the
CPU if one of the two following conditions holds :
1) an interrupt has been requested by the driver
2) at least one operation programmed in tne cycle has
completed (either a character has been accepted or
one cnaracter hns been received)~
I f none -0 f the con d i t i on s I s f u 1 f i 11 edt h e con t r 0 11 e r
automatically reoeats the cycle.
Il.3.2 Driver 16gic.
O.S3c is written in a serially reusable manner and serves
all Serial LinK Controllers.
It accesses d qiven D.530 storage block through a series of
indirect ~ointers. In addition it has access to the calling
handler stora~e block wnere jt finds -inf6rmation about a
specific terminal. D.53C finds in BC~-5 the address of the
jata block associated with the terminal to whiCh tne request
is directed. The structure of the oart ot the data block that
D.S3C accesses has oeen detailed in Table-2.
For each controller the driver maintains a linked list of
data bloCKS called the Actlve Terminals List. The head of
the list is part ot that controller local data structure (.ACTQ)
~hile tne elements are the calling handlers data blocks.
Each tim~ a request. is accepted by the driver, the calling
handler data block is inserted into the Active List of that
co~troller aCCording to the termin~l number (contained in
TERMA 'Nord).
Normally the driver ·.-rill reject a request if the previous one
has not completed. The only exception to that rule is the
" in 1 t i ali Z e t e r in ina 1" r e que 5 t 'JJ h i c h 'If i 11 c a use t he cur r e n t r e que s t
to be aoorted.
U~on request completion by the driver, the data block is unlinked
fro m t
rH~
1-\ c
t i v ~ Lis t •
4-86
11.3.3 Driver
~Lgorithm
description.
Like all ReS drivers the Serial Link Controller driver has an
initiator section (1.53C),a continuator section (O.5JC), a
power-fail/restart control section (P.S3C) and a time out exit
(T.53C).
The initiator' section is responsible for .converting a requested
operation into appro~riate actions~
.
The following prologue takes place at request initiation 1n D.53C :
1) validity of request is checked
2) handler data olock is located, initialized and linked
to the Active List
.
3) if the Controller Is already active an interrupt Is requested
at the end of the current polling cycle and step 4 is skipped.
4) if the Controller is not active the table of information
is constructed, passed to the controller which starts a cycle.
The continuator section Is primarily an interrupt handler and
event complete processor. The following procedure is activated
upon acknowledqment of an interrupt from a controller :.
1) the table at informations is obtained from the interruptinq
controlleF
2) for eacn terminal present in the Active List the op-code and
the step-number are used to determine the .next action l.e :
eitner a transition to the next step takes place and the
next element of the information table Is prepared
- or the request is completed If it has reached its final step~
3) it not all terminals have completed their requests the tahle
at informations prepared in step 2 Is used to· start the next
cycle.
.
If another interrupt occurs while this section is in use, that·
interrupt is queued and processed only when tne active interrupt
Is completed.
The power fail recovery section receiVes control from 0.04 after
power is restored to the CPU following a power failure.
P.S3C is responsible for ·restoring the controller interface
board to the status it was In when power failed.
4-87
Ill. Design Structures.
[11.1 Handler ---) Driver Interface structure.
'rh~ handler and the driver levels of software interface thru
calls to .IOC.,. The following functions are issued by the handler:
SUb-function
Function
00
01
01
00
01
02
02
03
04
05
06
Operation
Normal read of data
Transparent read of data
Normal write of data
Terminal initialization
Special write of HPIB commands
Remote Control Enabling
Remote Control Disabling
Service Request 'Condition Monitoring
Service Request Identification
III.2 Driver ---) Handler interface structure.
Tne driver returns requests to the handler level thru calls to
.BUFR •• The transmission log information Is passed in that handler
data blOCK (SUfL word), while the address of that data blOCK is
placed in BCW-7 of the returning buffer upon request completion.
When a call is rejected tne following return codes will appear
in the A and B registers :
1)
2)
A =1
B =0
: if the request parameters are illegal
(code, arguments ••• )
A =1 , B =100000 : if the terminal is busy executing the
previous request.
4-88
[11.3
~ajor
functional modules.
The D.51C driver is modular 1n its internal architecture. Each
module may be viewed as a "function processor" (modules which dre
responsible for executino a particular r~quest) or as a "common
modul e It (modlJ 1 es 0 r sub rout ines \"Ih iC.h aid func t ion processors).
Normal Read·
Description
~nd
function
Inouts a line of data from the current input unit of a terminal.
A line is considered terminated when a terminating character
is received (LF, Eor line LOW, SRQ line LOW or any special
function key defined as a terminator in TALKA).
Interface Description
JSR
OCT
• IDe •
JMP
RE,JCT
Dt:.:F"
OEf
TJt::N
0100XX
HUffR
xx is ·the LU of a Controller
·Exit to reject nddress
Start address of buffer
Length of bufter 1n + characters
The input unit is:speeified in TALKA bits 4-0.
All.lor i thm oeser iotion
1.
2.
3.
4.
5.
Put terminal in input mo~e
Enable input unit
Inout cnaracters until terminator detected
Disable inDut unit
Updat~ STATU, BUFL and return buffer.
It-.B9
Transparent Read
Description and function
Inputs characters from the HPIB, where it assumes that an input
unit has been pr~viously defined by a local controller. ReQuest
terminates upon-receipt of any normal terminating cha~acter,
any command message (whith ATN line LOW) or when bufter is full.
Interface Descri9tion
JSB
OCT
JMP
DEF
D£C
~lqorithm
.IOC.
OlOlXX
R~JCT
BUfFR
L£N
XX is the LU for the Controller
Exit to reject address
Start address of buffer
Length of buffer in + characters
Description
1. Input characters until termination condition Is detected
2. Uodate STATU, BUFL and return buffer.
4-90
Normal
() esc rip t ion and
~.
~~rite
un c t ion
Sends characters to the output units of a terminal. The line
of data is terminated by a LY char~cter unless the buffer
ends wIth a" <- II •
Interface Description
JSB
.lUC.
OCT
020()XX
JNP
REJCT
BUfFL
OEF
DEC
LEN
XX is the LU of the Controller
Exit to reject address
Start address of bufter
Length of data in + characters
Algorithm Description
1. Output characters in successive polling cycles·
2. End lIfith Lf (unless buffer termi.nated with "<_It)
3. Return buffer.
4-9'1
Initialize terminal
~------~-~-----~---
Descriotion and Function
Resets terminal to a well-defined initial state (display .cleared,
liohts off).
Interface Description
JSA
OCT
D~F
HEJCT
BUFFR
DEC
LEN
JMP
~lqorlthm
1.
2.
3.
4.
.IOC~
0201XX
XX Is the LU of the Controller
Exit to reject point
Start address of b~ffer
Not used
Description
Send command message with IFC LOw
Send comm"nd message witn IFC HIGH
Send Devic~ Clear command
Return buffer. .
The following error detection procedure is used :
- i f terminal does not respond in steps 1, 2 or 3 the error
bit 1s set in BCw-8 word'
- if terminal is busy, the current request is aborted and
terminal initialization is started.
4-92
Command write
Oescriotlon and Function
Sends
.
command messaqes constructed from data passed ip butfer •
H~IH
Interf~ce
Uescriotion
JSB
.IOC.
OCT
0202XX
.} ~\ P
BE J C 'f
DEF
BUFFR
DEC
LEi~
XX is the LU of tne Controller
Exit to reject address
Start dddress of bufter
Number of commands to send
Commands are packed 2 per word 1n the buffer.
Alaorithm Description
For'TIat comlland messages by ddrlin9 the A'fN oit to the data
bytes and send the~ one per pollinq cycle
2. Return bufter.
1 ..
4-93
Remote Control Enacle
Description and function
Sets terminal and associated instruments in
re~ote
control mode.
Interface Description
OCT
.IOC.
0203XX
\.H'1?
Df::F
HEJCT
HUFFR
DEC
LE.:N
,,),SA
XX is the tu of the Controller
Exit to reject point
Start address of buffer
Not Ilseej,
Algorithm Description
1. Set REN nit in T£RMA word,
2. Send messaqe with REN line LOW
3. Het'lrn buffer.
Disable Remote Control
Description and Function
Resets the terml~al antj its associated instruments in their local
control mode.
Interface Oescriptlon
JS8
OCL'
.IOC.
0204XX
\J~'P
kEJCT
DEF
Btl F'~' R
DEC
LF~N
XX is the LU ot tne Controller
Exit to reject point
Start address at but fer
Not used
A110rithm Description
t. Zero out REN bit in TERMA word
2. Sen a com:n a n dm e; s 5 age with REN line HIGH
_3. Return butter.
4-94
~~lt
Until Service Requested
----------~-----------------
Description and Function
Watches the SHQ line until a uhit on the terminal requests service.
Int~rtace
Descriction
JSB
.IOC.
nCT
0205XX
J:I\P
Dt=;F
Rf!~JCT
BUFF'R
r)SC
LEN
Xi is the LU of the Controller
·Ex i t to re j ect point
Start address of buffer
f\lot used
Alqorithm Description
IG Put termindl in input mode
2. when SRQ line qaes LOW return buffer.
Identify· Unit Requesting Service
Description and function
Determines whicn unit on the terminal requested service. Units
to explore are taken tram a list of units specified in the buffer.
Interface Description
JSB
.fOC.
OCT
0206XX
Jt-1P
HEJC'f
l)l-~F
UUfFR
Dt:C
LEi·J
XX is the LU of the Controller
Exit to rejett· point
Start address of buffer
Minus number of units to explore
Aloorithm Description
1. Dis~ble all output units
2. Disable all inout unitss
~.·~nahle Serial Poll Procedure
4. for each unit to be explored
4.1 Endole in~ut unit
4.2 Head status from unit ana store into buffer
4.3 If SRQ bit set in status byte proceed witn step 5
5. Dis~ble dll input units
6. Disable Seridl Poll Procedure
7 .. Check ',t.it\ether SRQ qone
~.
() 'J r1 " to? ~.; r ,\ r r I ..~ 0 r d -1:1 d ret urn b ~l t f. P. r •
Get - ~; e 'II -
Wo r
d
Sub r 0
uti n e'
(G E T N ~-J )
----~~--~-~-~~~-~-~~~----~-~~--
Description and function
Builds a new ~ord of the information table according to the
contents of T~RMA word bit 15-6 (operation-code and step numbE!rl.
~f the information table shows an input operation that nas
successtully completed, the character of t~e table is stored
in the butfer.
The step-number part of TER~A word is updated and the current
request 1s com~leted 1f the very last step has been reached.
The structure ot the step number information is described in
Taole-3.
Send-New-word Subroutine (SEND)
Description and Function
Once the information table has oeen built, this routine ciutputs
it to the controller. The transfer is programmp.d _ usinq the skip
on flag technique and only the relevant part of tne information
table is passed to the controller (the last word nas its STOP
bit set to 0).
·The· followinq error. detection/correction procedure 15 used :
1) if power failure occured just after the table has been sent,
the transfer is restarted
2) it the flag on the controller board is not comming back after
the transfer, the power fail condition is checked as 1n 1.
3) atter the whole .table has been sent, a time-out of 2 seconds
is progra~~ed to be sure to come-back even it power tails
durlnq the polling cycle and prevents tne controller from
interruPting.
4-96
lnt.:ormation word format.
Driver
--->
Controller.
to Termindl in input mode
'Interpretation
Bits
15
14 .
13-12
11-0
Last word of table indicator (STOP) :
o : last word
1 : not the last ~ord
Not used
00 tar input mode
Not llsed
2. Termindl in output mode :
Interpretation
Bits
15
1 '1
13-12
1 l'
10
9
A
7-0
Last word of table indicator
Not used
01 for output mode
TI:'C line state
HI:: r.I 1 in e· s t d t e
f':U I 1 i £'le. 5 tea t e
"TN line st-3te
Data byte .. 1 lnes
3. Terminal in idle mode:
bits
15
1 (~
13
12-0
Interpretation
LdSt word of table indicator
Not usee
t for iC11~ :node
i~O
t
tl S
ed
Controller ---? Driver.
1. Terminal in input mode
Intertlretation
Bits
15
14
13-12
Last
~ord
of table indicator
Transmission error flag:
o : transmission error detected
1 : no error during transmission
00 tor input mode
1t
Not used
10
Data byte present fldg :
9
B
.,
-()
o :
no data byte transmitted
1 : valid datd byte transmitted
~O[ line state if data present
SHQ line state if no data present
ATM line state if data 'present
Not used it no data present
Data byte if data present
N~t used if no d~ta present
2. Terminal in output mone :
Interpret2ltion
Bits
15
14
13-12
11-0
Last
~ord
of table indicator
Data byte accented flag :
o : data byte not accepted
1 : data byte accepted
01 tor output. mode
'., ~ s sag e be i n q 0 u t P tl toy
d
r i ve r
]. Terminal in idle state : ,
Interpretation
Bits
15
1.'.
13-12
11-0
wor:i of table indicdtof
flot used
10 for icile mode
Not usp.d.
TJast
4-98
Tanle-)
[0
Data block structure.
0.53n (n=O to 7 stands for controller number) module:
- head of Controller Active Terminals List
- power-fdil/r~cov~ry indicator
1
recovery tram power failure occurred during cycle
o : 'no power failure during cycle
In T,TxxH (xx stands for the terminal number) module :
LiNK
'1'1!: Hr·1 A'
TA.LKA
ST J\ TU
- link in Active List
- terminal address specifications
bits
4-0: address of terminal on Serial Link
5
not used
6
start of request flag
1 : R~N line state (1 1f LOW)
1 1- 8
s t e pre a c h e din r e q II est ex e cut ion
15-12 : op-code of current operation
- ter~inal input unit specifications
bits
4-0
input unit number (37 if none)
13-5 : special function keys' mode indicators
o : key is not a terminator.
1 : key is'defined as a terminator
14 : SRQ line terminating ~ode
o :. SRQ 'detection' 'Nill not iend input
1 : SRQ detection terminates input
15
not used
- terminal status word
bits
0 : service requested indicator (SRQ)
o : SPQ line was rlIGH
1 : SRQ line was LUW
2-1.: read request completion condition
o
normal completion
1 : HPIB command message received (ATN L
2 : but fer has been filled
unit identified as requesting service
7-3
not used
4-13
power fail indicator :
14
u : power did not fail during request
1 : potential error due to power failure
terminal
bUSY indicator :
15
o
terminal not busy
1 : terminal busy executi~g a request
4-99
Table-3 : Step
numb~~
information structure.l
-----~-----~~---~~----~~~---~--~~-
Bits
Interpretation
----.. -.. .. -.. -~
15
14-13
12-0
Source of next information word :
o : computed by routine whose address is
in bits 14-0
1 : word 1s encoded in remainIng bits
(40 d i fie at 10 n s to ap ply to in for rn at 1 C) n W0 r d :
o : not any modification
1 : merge with TALKA bits 4-0
2 : merqe with BUFA word
Bits 12-0 of the information word before
applying the modifications.
4-100·
SECTION V
RJE
RJE
COt~TE,;NTS
DRIVER (RJE)
1•
·0.62
INT~~cnNNECT·KIT
2.
Ctu
C ON SOl,~:
3.
SYN
SYNCdHnN()US CUMMlINICATTONS
4.
O.~O
SYNCHKI)NUUS
5.
Hl.O
Hu~l'
6.
tH~O
liUST tU·:AnE~ CU~PRES~ 1 UN
7•
Hi'.10
HOST
MF.SSAG~
ij.
1110
H (I S l'
L f\! Q LJ I
9.
Appendix A
MUt, r I L P. AV1 "1 G S P ~~ C 1 r' 1 CAT I r) I~ S
1 o. CDC R.J ~:
J N P LJ,. IfHl 'I' lJtJ 1 HA ~ f) LF.R
L] Sf
CO"~MlJN
ICA1IUNS OHI VER
lH':ClJMPPt-~SS
~
r.:
HANOLEH
ION HA r~DLER
U~:cnMPR~SS
HANDLt:R
I flN
HANDLFH
C (J MP R1:0: S::; l fJ N it A ~ D L F R
I.
Introducticn
These modifications setve as 'an ~xtension of the C.61 Driver
to allcw RJE Console operaticns. Function~ i.plemented arE READ~
WRITE, and INI!.
.
II.
Design overview
driver
This
is
to
desi~ned
run
in
the
HP2000
ACCESS
~nvircnmant.
The modifications vill allow the RJE console" feature to bg
implemented as a Buffered (Queued) I/O device. READ ASCII, WRITE
ASCII, and INIT/CLEAR requests will be accepted. The processorto-processor interface provides for operation synchronization vith
a" ftreguest-to-send," "permission~to-send" approach.
modules include rEAD request processing, WRITE request
INIT request processing, and SP command processors.
All routines have access to the output routine OHTOM.
Major
~rocessing,
III.
Design Structures
~~jg~ !~~l2nAl ~~Yl~~
The
INIT processor must be invoked to initialize BJE Console
The calling sequence is as follows:
~rocessing.
INIT REQUES1
JSB .IOC.
OCT
This request
reference.
~~99XX
saves
(XX is logical unit number)'
~he
EQT
address of the unit for later
It may also be us~d to CLEAR operations active on the driver.
An active operation will be ~Rported ty a ~8UFR call, c~eating a
eRa entry.vith "a":3.
The READ
an .IOC. call.
processor is entered to process READ r9guests from
The calling sequenca is:·
~
5-1
B EA D RE QU E S 'I
JSB .IOC.
OCT 91991x (119911 for queuing)
DEF BurR
,
is entered if the driver is bus),.
(buffer length) is the numbe~ of characters in the buffer.
Only
ASCII
READ's with byte data (positive buffer length) are valid.
READ processor ezecution is su •• arized in the
aecoapanying
flowcharts.
'Ihe va lTE· processor is entered
requests. The calling sequence is:
to
process
• IOC.
IRI~rE
II BITE REQUES'r
JSB • IOC.
OCT 112/1/1Xl (12,8,1X'X for queui nq)
Again, only ASCII records with byte data are valid.
sequence is given in the accompanying flowcharts.
The
ax~cution
The SP
These are:
16001"
160026
160037
cc •• and processors process the 2 sP-to-IOP co •• ands.
Wake RJE up
Have console 8essage
Console buffer empty
Have console
on the eRQ.
~laced
A:
message results in an unsolicited event being
~ts form at is:
'99911 (wbere IX is console logical
un! t nu.b Er)
A READ should be issued when such a Ague st is receiVEd.
A write cclftlland to D.62 results in· an lOP to SP co •• a'nd beiltlg
sent (16LLOS where LL is length of message) e, upon receiFt of tbe
"console buffer ellpty" cO.llamd fro. the SP, the ••ssaqe :Ls
transmitted to the SP via D!l.
5-2
A read command is is~ued when the SP indicates it bas data
for the RJE sutsystem through a "have consol~ message" command.
Upori getting the read command from the RJE subsystem, an lOP to SP
command is issued to tell ~he SP to send the data.
That command
is "wa ke RJ E u pt' (1600.11).
5-3
~.2!!.2gJ&
lng
~~§£IiRSion
IlP ut /0 u t .Ell.! Han dl it.£
typcti2n
The console input/out~ut handler (CIO) is respcnsible for
initiating all input and output requests to the console.
It
accepts console messages f~o. various handlers and issues queued
write requests through .lOC.
The handler :responds to an attention request and issues a
priority read to the console via queued .IOC.
Another function of this handler is to identify the .essages
read from the console. This is necessary so that the message may
be transferred to the appropIiate handler •
. The handler
.~st
also rEcognize the responses to reguests for
the 'System Connect· (SC command)
and 'System Disconnect'
(SD'
cosmand).
It will then be ~ossible to filter out ina~propr:Late
RJE commands before they are transferred to other handlers.
, The console input/output h~dler can rece ive consolE .essclges
fro. several different handlers. The buffer is freed when the
write request is complete with two exceptions. If the console
message vas received from thE host message decompression handler,
it is 9i van to the ASCII files handler for the job aessage log.
If it vas received from ASCII files (jot inquire functicn), it is
given to HIO.
event indication received by this handler
flom the console, an indication of
system shut down, or an indication of system initialization.
The
unsolicited
vill be a request to read
This
follows:
handler
will
transfer
messages
to other handlers as
SC,SD,ER
synchronous handler
SR',TRt,RR' host r~ader compr£ssion handler
Re-msg
hest inguireccmpression handler
The DA command is handled within this 'routine as described belove
Any other command is assum~d to be an inquiry to the host and is
sent to HIO.
If
the
command
from
the console is 'to be transferred as a
(RC- m5g),
it is fj~rst
block. of data to the synchronou,s handler
5-4
converted from ASCII to EBCDIC
conversion routine (.ATOE).
INBUP
QNA!'!E
SHNAPl
CICNM
SYSGT
via
a
call
the
central
address of tuffer used for console input
console input/output queue name
synchronous handler queue nalle
host inquire compression queue nalle
'system activity' gate is set to 'nope if the RJE
system is ccnnected and set to 'skip' it is not
The buffer control verds associated with
printed on the ccnsole are defined as follovs:
Word 2
iord 7
word 8
to
Bit (s)
P'uncLioll
3-0
coa.and=1
.essage size
15-0
15-13
12-0
Data word 1 15
14
messages to
be
Synchronous handler run status
(unused)
.essage is fro. HKO
aessage is fro_ ASCII files handler
The buffer control vords associated with aessages transferred
from the console to other haDdlers are defined as follows:
Bit
Word 2.
Word 7
(s)
15-4
3-0
15-0
Function'
(unused)
cOII.and=7
IIEssage size
The unsolicited event indication is defined as follows:
A-reg -
15
14-12
B-reg -
15
o
1-system overflow flag
O-normal unsolicited event
zeroes
system shut down
system initialization
!lg2~1!h1!
The console input/output handler has 3 entry points:
CIOHI -
CIOHP -
initiali%ation section
scheduled pIimer section
5-5
CIOHe -
com~leted
event section
In the initialization routine, (CIOBI), system service .FIND
is used to determine the queue names of all handlers with v'hiehcommunication is required.
On entry, it saves the logical unit
number and merges thi~ number into all of its .IOC. eall
parameters.
A clear .IOC. call is made to purge any previous
outstanding requests and to initialize.the ICK driver.
In the SchEduled section (CIOHP), all queue entries are
inspected and appropriate .ICC. calls are m~de. Ift~e Entry is a
buffer, a rea~ request -is gteued and i:f it is a message to print,
a write request is queued. SYSG~ is o~ened or closed when the
handler recognizes: a 'CC~r!UNICATIONS ESTABLISHED' or 'SYSTEM
DISCONNECTED' message, ras~ectively.
When ciommunications are
established, start commands are sent to ASCII ~iles handler to
start the. job· message and job inquiry functions.
At discOnlrlect
time, stop messages are s~nt to terminate these functicns. While
RJE is active, console messa~es received from ASCII files vill be
sent to HIO and messages received frcm HMO will be sent to ASCII
files hancller.
There arE th~ee main ~arts of the 10 complete ~ection
(CIOHI). When an unsolicited reguest for a read occurs, a buffer
is obtained and a priority read request is made. When system shut
down occurs, the queue is pUIged and all console messages are
ignored until system initiallzstion is received • .
When an 10 complete indication is received, it is first
n&cessary to determine if the ccropleted event was a read or write.
I:: a wri te, t be buffer is t hen freed or. passe d cn to HIO cr ASCII
-files as required.
If the completed event was a read, the type cf co~sol9
message must be determined se that it may be transferred' to the
appropriate handler.
If the RJE system is not connected, RJE
co~mandsa~e inappropriate and an 'RJE
COMMAND NOT APPROPRIATE'
message is printed on the cOIscle.
In the case of a 'RJE-tA;hfdev' command,
the text is scanned for syntactic errors. If correct, CIC uses
the device assi~n,ent manager to make the assignm~nt. If the
~ s s i Ii ~~ Lo~~ n t is n c t"S II C (; .? oS sf: t.1 I
a.n
::. ~. p ~ : l .p z: i 3t. ~
u!"t' 0 ':
m~:S da u ~ han d 1 a r
(9 X h au s t ~ d i n put
and by th~ conso'le 1/0, handler (cutput messages).
?t.
"
5-39
b u E.fer s )
This handler has two ~~t~y points: an initialization section
(HMOHI) and a main queue ent~y processing section (HMOHP).
At
initialization, the gueua names of this handler and the console
input/output handler are foutd via .PIND and saved.
The host message d~ccmpression handler receives blocks of
compressed console messagEs frcm the synchronous handler.
One
blcck may contain sever~l ccnsole messages.
It is therefore
necessary to determine whether or not a block of data is already
baing processed.
If so, the output buffer processing section of
the handler is entered. If Dot the input queue processing. section
is entered.
·
In the input queue landling section, a queue entry. is
obtained. It vill be either an input block or a buffer. If it is
a buffer, the decompress routine is entered. If it is an input
block, and the handler is waiting for a buffer, the entry is put
back on the top of the queue.
Otherwise the outEut bu:Efer
processing section is entered.
In the output buffer ~rocessinq routine~ a ~heck is made to
determine if a buffer has al~Eady been requested.
If so, the
input queue handling sEction is entered. If not, a console buffer
is reguested. If the regu~st is satisfied, the ~eccm~ression
section is entered. If not, the handler suspends itself until a
buffer is acquired.
In
the
decompressiot
section,
one line of data is
decom~~essed into an intermediate buffer using
.DeOH.
Depending
on the size of the decompr~ssed message, either one or tva console
buffers receive the'text and are sent to the console I/C handler.
If the input block is compl9ted, it is returned to the synchronous
handler. If net, no further processing takes place and the
handler simply exits.
5-40
D~§criEt~2n sn~ i~nction
. The primary function of the host inquire compression handler
(HIO) is to receive remote. command messages' froll the· console'
input/output handler, ~compEess them, and transfer thea to the
synchronou$ handler.
Interfacing
The host inquire com~ression handler will co •• unicate with
the console input/output handler and the synchronous handler.
·Queu~
entries received fro~ the console input/output handler
will be RC-msg type commands. ~hp ~~~saqe mayor aay not have
'RC,' in front'of it. This tandler vill compress the messages and
give them to the synchronous handler.
The only queue entry received from the synchronous handler is
a control buffer indicating a ISH runningf command.
The buffer
will contain the synchroncus handler queue name, queue limit,
communications buff~r size, and the RCB for the console.
Buffers received as
requested by this handler.
input
vill
be communicaticns buffers
1~£s1 ~Za §!~~~~~~
One constant
never modified.
QNAf!E
is
estatlished
console input
at initialization time and is
compre~sion
Two constants are USEd in
centralized comFression routjne.
the
queue naae.
calling
INBUF
address of the input tllffer.
OUTBF
address of the output buffer •.
Three
com~ression
BFLl'IT
constants
are
used
only
by
the
sequence
console
of the
input
handler.
established when an output buffer is ottained and
is used to determine whether or not another entry
~i11 fit into the output buffer.
5-41
QSIZE
establish6d
when
an
inp ut queue entry is
obtained. If there are no more entries on the
queue, the cutput buffer vill. be i.mediately
transferred to the synchronous handler.
SFLAG
normally zero. It is set to -1 if the handler is
suspended bEcause the SH queue limit has been
reached.
Four constants are passed to the handler by the synchronous
handler wi"th the '5:H running' ccmmand.
OLI!!
the maximuJ number of ~ntries that may be in the
synchronous handler's input queue.
SHNA"
synchronous handler queue name. ilhen this va,lua
is zero, the handler is not operational and will
discard any inl=ut queue entries.
CBSIZ
communicaticns
buffer
size.
This value is
required in the requ~st for a cOIIJlunicati.ons
buffer.
CRCB
RCB for the console
The console input com~ression handler has two entry points.
In the initialization section, H10HI, the handler's own gueue na.e
is found via .lIND and sav9d.
The
operation
of
this handler is controlled by the
synchronous handler. It will not rec~ive any input queuE entries
until communications hav~ bean established and it bas received a
'SH running' command
from
the
synchronous
handler.
If
communications arE broken, the input queue will be purged by th~
synchronous handler. and all gueue entries will be discarded until
the next 'SH running' cOlmand is received. If the synchronous
handler input queue limit is reached, the host ,inquiry coapressio.D
handle~ will suspend itself.
Any queue entries received while the
handler is suspended will be I=ut back at the ·top o~ the queue.
Th~
handler will not process any entries until the Dext 'SH
running' command is r9ceiv~d.
The
~ossible
HIO
handler
at one time.
will process as man'i queue entries as
When there are no more queue entries, it
5-42
will complete the output buffer and transfer it to the synchronous
handler aven if it con~ains en!y ofie console .es~aqe.
5-41
Appendix A
. "Multileaving" is a term which describes a cc.puter-~~o
computer commutication protocol originally developed by IBM for
us-=! with its HASP system. lBtt's ASP, V51-JES, VS2-J'ES2, and YS2JESJ nov also support the lultileaving protocol.
In a qrC)SS
se'nse, multileaving can bE defined as the fully synchronized,
pseudo-simultaneous, bi-directional transmission of a variable
number of data streams betveeen tvo er more computers utilizing
binary synchronous communications facilities.
It
must
be
~mphasized
that this is ~2! a full duplex protoc~l, although full
duplex equipment may be used. Binary synchronous, comllunicatictns
im~lies bi-directional transaissions, but in only one direction at
~ time.
This protocol is as viable on half duplex com.unications
links as it is on full dupleJ.
~~j2~ £2!22~!§
At the heart of the protocol is a technique commonly referred
as "conversational aCKnowledgement."
Many
communicatie,ns
~rctocols
provide for acknowledging the correct receipt of d&ta
with special ccntrol sequences (ACK or ACKO and ACK1).
These
protocols have the disadvantage of wasted time in the s~nse that
th~ communicaticns line must be "turned around"
to transmit the
acknowledgement. ~he ackhovledgement is then transmitted, and the
line is "turned around" a second time for more data transmission.
l1ultileavinq acknowledges the correct receipt of data with data.
!hus, the pr~tocol is cODversational--transmit data, receive data,
~ransmit data, receive data, etc.
Only when an error occurs vhlcih
r~guires retransmission, or .hen one of the
two parties bas no
data to. transmit, does this flow break. In these cases, error
correction Qr band-sbaking pIccedures a~e initiated. It should be
cbvious that this conversational technique ,has a potential for
greater ~ommunications linE, utilization.
It also ~ives the
participating computers greater potential since processinq of
,received data may be overlap~ed with the transmission of data.
to
Another aspect of the multileaving protocol is its SUFPort of
~ndepandant data streams in
each direction.
~ vari~ble numt~r of
Sc!~h
bl::).;:::
of f1at~~
t=ans:ilitted .fro~\ cOlnputer A to cO."1pu"ter B lsay
contain ona or mors individu~l messages or record~. Each massage
is tagged with its unique data stre~m identifier sc that the
receiv~r (computer B) can sort the messages out and rout~ them
to
~ppropriate
destinations.
An additional feature of the Frotocol
5-44
allows the receiver of messages (computer a) to control its
initial and continued receipt of the messages for each data
streame
This is done as a
part
of
the
conversational
transllissions back to the sender of the Dlessages(coaputer 1). It
should be remembered tha t this prctocol is
bi-directional.
Therefore, each computer may play both the roles of sender and
receiver. So the statements just made about data streams in the A
to B direction are also simultaneously' true about those data
streams in the a' to A direction. It must nov be apparent that the
data making up each transmiseion typi~ally contains at least three
things: the inherent acknowledgement of any previously received
data, one or 'aore messages, and control information regarding data
streams which may te returnad.
A third important aspect of the lIultilea ving protocol is its
use of data compression. Each ~~ the m~ssages included in a
transmission is compressed in order to rellove character ~edundancy
via encoding. This, of course,' can alse improve liDe utilization
by reducing the actual number 0'£ characters in the transaissions.
7he basic element of each multileaved trans.issicn is the
character string. One or more character strings are for.Ed from
each aessaqe input to the computer for transmission. Messages ar~
usually of the classical types (card i.ages, printed lines,
magnetic tape. records, gtc.) •
.Por efficiency in transmission,
9ach message is reduced to a series of character strings ot two
types.
These are (1) a lariable length ,nonidentical series of
characters, and (2) a variable number of identical characters.
Due to the high frequency cf blank characters, a special case is
.ada,in (2) above when the duplicate character is blank. An eight
bit control field, termed a ~!Iing cont~2! BIt! (scQl, precedes
each character string to identify its type and length.
Thus a
string as in (1) is reptesented by an sea followed by the
nonduplicate characters.
I string as in (2) above can be
represented by an sea and a single character (the seB indicates
the duplication ~ount and the character fclloving is the character
to be duplicated).
In thE case of an all blank string, only an
sea is required to indicate toth the type and' the nu.be~ of blank
characters.
A .essage to 1:9 transmitted is therefore a group of
character strings, each precEded by its respective seB. 1 special
trailing null (~ero) sea delimits the message.
In order for the receiver of messages to be able to associate
each message with a given data stream, an additional eight bit
control field ~recEdes the 9IcuF of character strings representing
the original m~ssage. This field, the !2~2£~ £2nt£21 lls~ JRCll"
.,
indicates the general type, fUDction, and unique identification of
each data stream.
Note that the ReB also pro vides for the
grouping of multiple aessages of various types into a single
transmission block. A null (zeto) BCB delimits the block.
1
second eight bit control. field, the ~JlR~~· £52D1£Sll Il~ '~R£JU.
is also included im.ediately following the RCB.
This field .~y
provide additional information concerning the message to the
receiving prograa. For exaa~le, in the transmission of messages
to be printed, the SRCB can be ·usad for carriagE contrc)l
information.
For actual .ultileaYin~ transmissions, a variable number of
messages may be combined into a variable sized block (i.e. RCB,
sa c B,
S CB 1 ,
SC B 2 , . • •• ,
S CB I ,
ReB, SR C B, S CB 1, ••• etc. ) •
T be
Frotocol allows for th~
conversational
exchange
of
such
transmission blocks.
To allcw optimu. use of this capability,
however, the participating ccmputers aus't have the ability 1:0
control the flow of particular data streams while continuiJlg
normal transmission of others. !his reguirement baco.es obvious
if cne considers th~ case of the siaultaneous transaissicn of two
data streams tc a slste. for i.mediate transcription to physical
I/O devices
of different s~eEds (such as tvo print streaas). It
is also an obvious need in tbe case where one of the transcribing
devices becomes not ready, and it is necessary to sus~.nd the
associated data stream. To ~rovide for •• tering and susFensioD of
the flow of indi vidual data streams, a l!lnct~ll. ~ontrcl ~!gu,.DS'-!
j[~~l is add~d to each trans.lssion
block.
The FCS, which is
receiver oriented, contains a sequence of bits, each associated
with a pa.rticular data' stream.
The receiver of sevEral da1:a
streams
can
temporarily
suspend a stream by setting the
corresponding pes bit off in its next transllissien to the send.tr
of
that streaa. To resulle the strea a, the pes bi t can be turD~!d
on. In transmissions fro. A to a, the les nn~ by 1 tells B abo11t
those streams A vants to rEceive. The pes £i~!i!!S by 1 tells A
about those streaasB vants to receive.
error detection ana correction purposes, a ~£i' '9ntI'U
is added as the first character of each tt:ans.itt4id
block.
The' SCB, in addition to control information, contains ~
module 16 block sequence. count. These counts are aaintained and
verified by toth sending a~drec~iving systeas in o~der to
ex~rcise positive control over
lost or duplicated trans.issic)n
blocks.
For
l!~l:! j~l
Transmission
blocks
are
deliaited
by
standatd
binary
synch~onous co •• unications ccntl:ol characters
(STX, E~B, etc.).
~ultileaving
also uses the ACKO and 11K control sequences. ICtO
is used as time fill for handshaking
5-46
wh~n
data
is 'not
available
for
transmission.
i~tervals.
in,dica tes
received.
Pigure
block.
NAK
tha t
A
Normally, handshaking occurs at tvo second
used as ·the only negative response and
the previous transmission vas not successfully
is
illustrates
a' typical
5-47
IDultileaving transllission
lig.!!r~
Im£ll ulll!.!wll.9
.!
1.:~.n.§.!!iss1gn
R.l.2,!
r"~---~--- ~-,
DLE
BSC Leadel:
STX
BSC Start of Text
BCB
Bleck Contl:ol Byte
pes
PUDction Control sequence
Fes
Function Control Sequence
ReB
Record Control Byte for
saCB
Sub-Record Control Byte for record 1
sca
string Control Byte for record 1
DATA
Character string
SCB
string control Byte for record 1
DATA
Character string
-.--------see
terminating SCB for record 1
RCB
RCB for l:ecord 2
SRCB
SRCB for record 2
SCB
SCB for record 2
DATA
Character string
----------- ... seB
---_-._--- ..
Xerminating SCB for record 2
block terminator
ReB
~xansmissicn
OLE
BSC Leadel:
ETB
esc Ending Sequence
L---.. ---- --.I
recor~
5-48
1
l1ll!tilu!~n9. ~.sll!I.s1 .u~ll
.§ntlfica ti.9!!'§
Following is a complete specification of multileaiicg control
Th~ rEader should keeF
in mind that not all of tha
capabilities im~lied by these,definitions'have been impleaented by
IS,.. At the end of . this' a~pendix, s~ecffic omissions in the
implementation are 'noted.
fi~lds.
J J J J I
L-----------------~
7
o
10K L J
"
usage:
This field identifies the type and length of a
character string. One or more of such char~cter
strings
represent
a record or message for
t ransmissiot.
Definition:
c
o
=0
= 1
K
= a = Duplicate
= End
= All
of record (KLJJJJJ=O)
other SCB's
cha:act~r
string
L = 0 = Duplicate character is blank
L = 1 = Duplica t-a· character is ncnblank
(and follows SeB)
JJJJJ
K
Notes:
1.
2.
=
1
= Cuplication
count
= Non duplicat 9 cha,racter string
LJJJJJ = Character string length
If KLJJJJJ = C and 0 = 1, seB indicatas record is
continued in next tIansmission block.
count units are normally', but may be in ~ny
other units. ~he units utilized may be indicated
dynamically in the SRCB or other methods of
indication could be designed.
'5-49
r~---
- - ... - .......... ~---- .... _"
I 0 I I ITT T
~
I
L-----------------~
7
o
Usage:
This field identifies each record type within t;be
transmissiol
block.
Further,
it
uniquely
identifies
individual data strea'as when t]~e
record types are the same.
Definition:
o
o
= 0 = End
= 1 = All
of trans.ission block (IIITTTT=O)
ether RCBls
III = Stream identifier used to identify streaas of
multiple identical functions (i.e • • ultiple
. print streams toa multiple printer syste.,
etc.)
III
= Control information if TTtT = 0 (ccnt~ol record)
= 000 = Reserved for future expansion
= 001 = Request to ini tiate a fu.a-ction trans.lssioD
(Erototype ReB for function.in SaCB)
= 010 = Perlission to lnitiate a function transmission (RCB for function 'contained in SRCB)
= 011 : I Reserved
= 100 = Reserved
= 101 = Available for local modification·
= 110 = Available fc~ local .odification
= 111 = GEneral control record (type indicated
it SRCB)
TTTT
= Record type identifier
= 0000 = Control record
= 0001 = Cperator message
= 0010 = Cperator ccmmand
= 0011
• 0100
= 0101
= 0110
z 0111
= 1000
= '101
display request
= Normal input record
= ~rint record
= ~unch record
= tata set record
.
= 1erminal message routing request
- 1100 = Reserved for future expansion
- 1~11 = Available for .local aodif1cations
5-50
r------~---~------,
lOS 5 S 55 5 5 J
o
7
Usage:
This
field provides
a tout a reccrd.
Oaf ini tion:
o
supplemental
infcrmation
= 1 (Must always be on)
SSSS5SS - Additional information - actual content is
dependett cn reccrd type.
are listed belove
Several exaaples
saCB for General control reccrd
. (character)
o
Usage:
Identifies
record.
Def in1 tion:
character
7
the
~
type
of
generalized
control
A = Initial terminal signoR
= Final terminal signoff
= C = Print initialization rEcord
= D = Punch initialization record
= E = Input initialization record
= F = Data set transmission initialization
= G = 5yst~m configuration status
= H = Diagnostic control record
= I - R = Reserved
= 5 - Z = Ivailabl~ for local modification
= B
SRCB
for Print records
r--~----~---~~~~--,
10M C C C C
o
Provides
rEcords.
Usage:
Definition:
..
'
o
eel
7
carriage
control information for print
= 1 (Must always be on)
5-51
" =0
= 1
CCCCCC
Nor~al
=
carriage control
for future use
= BesErved
= Carriage
1000RN
control information
= Space immediately NN spaces
.: 11NMBN. = Skip imaediately to channel BRIllf
= OOOONN = Space NN lines after print
= 01NNHN = Skip to channel BNNN after print
= 000000 == SU ~pre S8 space
::
SRca for Punch records
r-----~--~-----~~~,
I 0 ! " B R R 5 5 I
o
Usage:
Definition:
Provides
rEcords.
7
inforaation
additional
abcut
punch
for
input
= 1 (!lust always be on)
5S = Punch stacker sel~ct inforllation
B = 0 = .Nor la1 EBCDIC. card image
= 1 = Column binary card image
f! = 00 = SC E count units = 1
= 01 .: SCE count units = 2
= 10
= SC B count units = 4
.: Reserved
11
=
RR = Reserved for future expansion
0
SRea for Input records
r---~~~-~--------~,
I 0 " B B R R B R I
L-----------~-----~
o
Osage:
To
provide
records.
De f ini tion:
o .. 1
" = 00
= 01
(ftust
= seE
= seE
7
additional
alvays be on)
counts =
counts
5-52
1
=2
inforaation
= 10 = SCE counts =
= 11 : Reserved
B
0
=
= 1
BRRR =
4
= Ncr la 1 EBCDIC card image
Colulln binary card ill age
=
Reservac
SRca for T9rminal message routing Iecords
r-----------------,
lOT T T T T T t l
L-----------------~
7
o
Usage:
Indicates
Df:!fini tion:
a = 1 (Must always be en)
TTTTTTT
th~ destin~tion
= Remot~
of a terminal
system number (1ST~99)
system qroup . (100STSf27)
= Broadcast to all remote systems (T=O)
= Remota
5-53
me~saqeo
r-~--~-~--~---~-~--~~------~-~------,
lOS BRA BCD lOT B R
o
7
8
i
X YZ I
15
Usage:
controls the flow of individual fancticn streaIl2••
~efinition:
o = 1 (f!ust a lllays be on)1
S =
1
= Sus~end
=0 =
T.=
A.ll stream transmission (iait-a··bit)
(A handshaking response of lCKO implies the
clearing of this bit.)
Norlal state
Remote console stream identifier
R = Beserved for futuIe expansion
ABCD ••• WXYZ
= Various
function stream identifiers (oriented
only to recipient.)
- Normal ~rint (or input) = A, S, C, •••
Normal ~unch str~a.s = Z, I, I, •••
- Other functions = •• ~ - •••
Note - a bit on = continue function transaiss:i.on
- a tit off = suspend function tIansaission
Note:
the print and punch .streaas may have
meanirgs for
terminals
with' multiple
d~vices.
For ~Jample,
bit "V" specifies function
continue/suspend for both ~rinter 5 and punch 4.
Bits
for
overlapFed
5-54
r-----------------,
t 0 X X XC CC C I
o
Usa.ge:
7
o = " (Must
a~ways
be on)
eccc
= ftodulo '6 block sequence count
xxx
= Control information as follows
= N(r Jlal bloc k
= 001 = Bypass sequ@nce count validation
= 0'-0 = Reset expected block'sequence ccunt to
= 000
-=
011
= 100
= 101
110
= 111
=
=
= Available for user modifica tion
= Available for user lIodif ica tieD
= Reserved
for future expansion
=
ved
Reserved
RESel.
ecce
!~i!i!l1ng ~ all1ileav~ng ~2~DEctioD
The Frocedure for establishing the connection of co.puter A
to coaputer B is performed BE fellows:
a tvo character
1.
A
2,
B responds with lCKO.
J.
A responds with the transmission of a block containing
a single message which must be a signoD general control
record:
t~ansmits
~equence
(SOH,EHQ) to B.
DLE,STX,BCB,FCS,RCB,SRCB,signon message,DLE,B!B
RCB must be 11110000.
SHeB must be 11000001.
signoD message is as defined by system Band dces
appEar in compressed fora •
4.
The
not
. Assuming
acceptance
of the signoD ty B, norllal
processing
.ay
ensue.
(Otherwise.
furth,er
transmissions frol B to A viII usually cease.)
.f!.'!:.2!.!!.u ! gIll §t.J;eaa 1U.1l§.!i.Yi~
The
procedure
for
initiating
and perforaing a data
transmission frem A to B is as fcllovs~ In the example, le~ X be
the unique RCB associated with the data stream in questicn:
1.
1
transmits to B a request to initiate a trans.issioD:
DLE,STX,BCB,FCS,RCB,X,O,O,DLE,ETB
RCB
must
be
RCB for v:hich
2.
10C10000. SRCS must be X Jthe prototype
lission is b~ting requested).
pe~
B responds with a per.ission:
DLE,STX,BCB,lCS,BCB.I,O,O,DLE,ETB
RCB must be 10100000.
SRCB lIUst be I ·(tbe RCB for
which permission is being granted).
nov proceeds to transmit the data stream .essageis.
(Refer to "Transmi$sion philosophy.")
3.
A
4.
A indicates' end of a data stream (end-of-file) by using
a terminal message which bas a zero seB for its first
5-56
ses.
Note that an all blank
transmitted as a null message.
*NOTE*
message
cannot
be
console strea ItS, permission is never sought· nor
End-of-fila is never
used.
Cnly
the
processing noted' in step 3 occurs.
Fer
9ranted~
Each transmissicn block is initially chscked using convential
cyclic r4dundancy check techniques.
NAK is used to r~quest
retransmission when the check yields an error. NAK is also used
when no data is r4ceived'for a period of three seconds.
Several other logical eIror conditions can also occur:
lt~§
.§.2.!I.!!.!!lS..! £!l.§~! - Tc l:lSUl.Cl that data blocks ·are received
in order and that no blccks are missed, the follcwing Bea
testing is' done:
Let x be the recei ved Bce and Y be the
expected ECB.
If I-Y>O then a block has beer. missed and a·sequence error is
detected.
If X-Y=O then the prcper block has been received and it is
processed.
(Y is incre lented as teh ndxt expected x.)
If .X - Y( 0 the n :
If
is
a.
If 16+X-Y>2, then a sequence error is detected.
b.
If
16+X-I ~2, then the received
duplicatE acd is discatded.
a
blcck
is
a
sequence error is detected, the following transmission
used~
DLE,STX,BCB,FCS,RCB;Z,DLE,E!E
Bca usually indicates reset tlcck check count. RCB is 11100000 to
show the error. Z reflects .hat the ex~ected BCB vas (Y 'in abova
~xample).
The receiver of this message may reset his t~ans~itted
Bca to Z. However, data has probably be~n lost, and restarting
tha curr~nt transmissicn3 cr aborting the connection may be more
appropriata ..
5-57
2! .r§.g~l§ ~2 llu§ail; - these may be ignored,.
However, the IBft HASP system aborts the connection in this
case.
!!.Y.el~~nsi.!;Ul
!2n-ixt§~!nl
~§ ~ RrotgtlR~ RCBls - these are ignored.
Any unprocessed messages in the transmission are ignored.
~.e~~1al ~!Jl'§
certain
features
of the multileaving protocol,
1efined, have not been i.ple.ented by IBM. These include:
1.
Record
types
otler
than
~rint,
punch,
though
card input,
console, and contIel are not supported.
2.
only
3.
see counts other than one are not used.
4.
No "continued"
s.
No support for not-EBCDIC transmissions exists.
6.
Although the protccol allows a mixing of Bce tYF8S in it
givEn "transmissict block, th'is is not done in pra.ctice.
Consid~r
message~ A, B, C in a transmission block eacb
for a. different data strea. (mixed RCa's).
If the
I:esource's to ha tdle messa g8 A, are not available, the:tl
messaqes Band C light be locked out as vell.
Thus,
data streams Band C are being artificiall, inhibited.
By keeping like RCS's in a transaission block, streaa l
could be suspanded vhile transmissions fer a and C
could continue.
~he
signoD general control record is USEd.
seE's are used.
.
.
5-58
I.
lntroduct ion
As outlined in the Product Requir~lIi&nts of s"~ptellber 25,
19"14, this project will be an option to the currently defined IBM
RJE co~ponent of the "HP2000 ACCESS system, a CDC cOMpa~ible RJE
component.
This RJE function, emulating th~ CDC 200
User
Terminal, will provide remote acc~ss to a CDC machine. Concurrent
with this RJE capability," the I/O Proc~ssor will continua to
support tha 32 terminals accessing the TSB systam.
II.
fdribtional
Spe~ifications
Following the impld~~ntation
.1
th~se
enhancem~nts,
two
distinct functions will exist in the HP2000 ACCESS syst~m~
The
obvious function is the TSB s:,.;! I." t!.Q which will continue to exist
and o~erate as in the past. In"addition, the I/O Pr~ce~sor vill
be able ~~ function a~ an BJE station. In this way the HP2000
ACCESS syst.em may serve an installaticn for time sharing at the
same time it provides aCcess to a remote CDC system (referred to
as the host system).
The RJE function will be based on the CDC 200 Oser Term"inal
synchronous telecommunications protocol. It will operate on data
in
the ASCII or BCD codes.
Job input" to the bost is in the form
of 80 column card image data. Job output from th~ host is in the
fora of printed lines. Rost oper~ting syst~ms g~nerally ~efer to
thgsa types of inputs ~nd outputs as read~rs and printQrs
respectively.
(There is also input ar.d outPllt in the form of
console data.) The design of this software, howev~r, is such that
there need not b~ a fixe1 association with physical devices. It
vill be "possible through HP2000 ACCESS opera~or commands to
designate the actual devices to be used. In ~ddition to real card
readers and line printers attached to the t/O ~roc~ssor, data
streams bet~een the TSB system and the I/O Processor vill be
available.
Functioning as ASCII tiles availaole
to
BASIC
programs,
these
data
streams will also b~ av,ilabl~ for
communication with the host system. Thus, transmissio~ of data to
th~
host
from
a BASIC program might be substituted for
t~ansmissions from a real card reader.
Similarly, outpu~ might be
directed to a BASIC program rather than to a real line printer.
Thare will also be BASIC ASCII file access to th~ console data
streams.
Since the CDC 200 User Terminal will op-=rate ili~h
several CDC host operating s1st~ms, no attempt is m~de in ~his
docum~nt
to outline hl)st-specific operati~g procejur9:; • . Appendix
A ~f this document does provide a list of ~ome CDC Manuals which
lIa y "be use f u 1.
5-59
~ lUi~'!
The 32 users attach~rlto the TSB system through the I/O
Processor vi1l continue to uLilizc th: system exactly as described
in the HP2000 ACCESS u3~r's manual. Use of the special ASCII
files for host co.aunication~ will follow normal" ASCII "file rules.
The names for these ASCII files will be JTO, JLO, JIO, and JKO
(Job Ttansmitter, Job Line printer output, Job Inquiry, and Job
Messages). The term "job" is used by CDC host systems to refer to
a unit of work performed for a us~r of such a system.
The job
inquiry and message functions correspond to console input to the
host and console output from the host r~spectively.
Except wh~re nec~ ;s~ry, the remainder of this document will
deal primarily with th~ Ql~ function as it relates to the use of
real devices.
For inLJ~m~tion on th~ use of the ASCII files,
refer to appropriate sections of the HP2000 ACCESS user's .an~al.
the TSB operator assumes a~ added rol~ as ~ result of the
enhancements. In addition tc managing the TSB system, he becollles
an op8tator of the BJE station ~s well.
He is both a ~SB .operator
and an RJE operator. In this capacity he has these naw duties:
1.
Initiate the
CDC system.
connection of the system to a host
2.
Assign input and output devices
r6ading ahd printing functions.
3.
-Operate the input devices in order to trans.it
jobs to the CDC system.
4.
Monitor the line printer
listings a nd load forms.
s.
Kake reaote operator inquiries and/or control the
job flow via remote operator commands.
6.
Initiate disconnection of the system from the CDC
system.
7.
Request a report of ccmmunications errors.
to
the host
in order to separate
Before describing the' operational d~tails of these new
duties, it is appropriate to d~scribe the function of the operator
conscle.
The operator console is physically attached to the
5-60
System Processor, not to the I/O Proc~ssor.
Comaunications
betwe9n
the tvo processors is via a computer to computer
interconnect kit. Enhancem~nts to the System Proc~ssor will allow
messages (commands or inquiries) d€stin~d for tbe rellote CDC
syste·m t.o 009· entered on the S yst~ m P roc~ssor t s consol":!.
These
will be s~nt to the I/O Processor via the interconnect kit for
actual handling or·t.ransmission. In addition, operator messaqes
received from the CDC syst~m vill be sent through the interconnect
Jti t to the System Processor for dis·~' lay on t.he 5yst em console.
It
is important to note that messag~s receiv~d lS a r~sult of TSB u~e
(inquiry via JIO) will also be logqp.d on th~ syst~m console.
III. Interface Specifications
comrnar.cl.. for the RJE function are
to each command ar-:t discussed.
However, if the RJE commann ::'~Il nut be interpre:t:~t.l as on':? of the
legal command~ shown, the following '~::ror m.::!ssag'3 will
be
In
this
section,
all
described. - Specific responses
r~ceived:
RJE COMMAND EPROR
Another possible error is the use of c~mmands at inappropriate
times. Some commands are inappropriate if enter~d when the RJE
function is ~ot connected to a host CDC syste~. If this fact
applies to a command, it will be noted in the d~scription of the
command.
The following 1eneral message is then used in response
to a command entered at an i.proper tim~:
RJE CO!MAND NOT APPROPRIATE
Not~
that all commands ~nd all related responses begin vith the
characters "RJE" which allows Q~sy visual s~paration of RJE
functional activity from TSB activity. The RJF. function vill take
a "back seat" to TSB US9rs if the system becomas heavily loaded
with work.
Should this occur, responses eo commands may be
delayed, and activity on the associated I/O davices may degrade.
This is done to prevent int9rf~rence with ~he TSB user.
;a.Y.ll~ £Q!lJl ~li2n.
If
ACCESS
the operator wishes to connect (or r..:-connect.) the
to a host CDC system, he does the following:
HP2000
syst~m
Enter
1.
.
the
followicg
console:
Proc~ssor
5-61
commdnd
on
the
sys~em
RJE-SC,n,m
(SC=2ystem £onnection)
where n is the site ~ddr9SS (oct al 160 to 177)-.
This number is determined by the host CDC system.
m is th~ code (ASCII, lOCO, or nco) to be used
for the duration of th~ connection to tbe host
CDC.
Default specifications of nand m will be:
n=160
a=ASCII
Subsequently,
they will 1efault to the last
values u~1. ~ith&t op~rand may be omitted.
If
n is omit~~d~ the form ot the command must b~:
R.JE-SC, ,
Aft~r
receive
RJE
II
this
message:
.'?tl":~rir.g
th~
$~STE~
command,
the op€ratcr may
ALREADY CONNECTED
This message indicates that a previous connection
is still in effect. ·Thp. ')perator lIay then accept
this existing connp.ction or force 4 disconnection
(see below) and retry tha system connection
described here.
Normally, tha following
messag~
will be received:
RJE SYSTEM READY
The operator should proceed to
2.
s~~p
2.
Ready
the
communication
line.
This vill
typically involve dialing the CDC system, waiting
for an' answer, and then placing the data set in
data .ode.
If
non-switched
communications
facilities are in use (a "rtedicated" or "leased"
line), no action is ~sually r~qu!red to ready the
line.
If it is possible for the CDC system to
call its remote stations ~nd the data set in use
has an auto-answer capability, the TSB operator
may elect to ready the communications line by
enabling the auto-answer.
ihen the CDC system
calls, the RJE function will then
continue
automat ically.
5-62
As soon as tile connection has b~·'?n established,
the TSB operator vill receive this m~ssage:
3.
RJE coaMUNICATIONS ESTABLISHED
~.!i~ !§2i..gJUl~nt
A data source or d~stination must b~ associated with each
host readinq and prin~in'g function.
When tile I/O Processor is
loadad and started, a ti,'efault assignml?nt of +:hese sourCE:S and
destinations vill occur. Hov~ver, the op'1ra~or Inay vish to changethis assignment from tim~ to time, so a command is available for
this purpC!5e.
Physical
ASCII
fil~3
character
devices:
fa:
name
CRn
,JTO
LPn
JLO
devices
host
and
att
:~h~J
to
communications
a n u mbeL IJ :: ;;0 d
, ..
I.';
t 0
Pt'oc~ssor and th~ TSB
rtgsignated by a tvo
i 51: i n 9 ui s h !Il U 1 tip 1 e l i k ~
I/O
are
j
carri read&rs
io h transmitt '~r
lind printers
job line prill~~r output
All ASCII file names ar~ numberad relative ~o zero.
"n" value in these names is also relat1ve to z~ro.
Similarly, the individual host
designated as follows:
HRn
HLo
host
host
rgadin~
Hence,
th~
and printing functions are
rcadin~ functior.
lin~ printing function
For these names, the "n" valu~s start with one. This is to
provide for be~ter association with the names commonly used by the
host syst~ms to refer to these functions.
For compl~ten~ss' sake it should b~ noted that there also 9xis~
host inquiry
(HIO)
and host m~ssag~ (HMO)
functions.
Thesp.
functions
are,
hovev~r,
al~ays
associated with the system
~p9rator's oonsole ~nA the Job inquiry/Job
message ASCII files.
Ther~fore,
th~y
are not assignable by operator command. For ~he
operator t~ make a device assignmant, ha naad s t~ d~sig~ate an
associatio~ between one of the physical jevic8s o~ ASCII fil~s ~nd
one of the host functions. Nat~rally, some ~ssignm~nts would not
make sens~,
for example a c~rd read~r with ~ printing function.
Tharefore, in order to assist the operator in making th~ pr~per
assignment-5, i!n "arrow" ("<" 0= ")'.) is used in tha command to
5-63
show the direction of the data flow.
ccmmand is as follows:
2£
The
general
form
of
the
RJE-DA,hf(dt.;:v
BJE-Dl,hf)dev
where hf designates one of the host functions a~d day designates
one of the available devices. The first form is used to assign
devices to the reading function (the arrow indicates flow of data
from the devica to the host: RJE-DA,HR1(CRO). Th~ s~cond form ie
used to assign devices to the printing function
(t~e arrow
indicates flow of data tram the host to tha d~vice:
RJEDA, HL 1 )LPO) •
These assignment;..; Ih;~t
be mad-:- at any tim~. Howev.er, they
will cnly become effective·t the timH the use of a device hegins.
Por input" devices, use begins at th~ time 9f ·the SR command and
ends at th~ time of a TR command (see below). For output d~vices,
use begins with the initial receipt of da~a from the host and ends
when that output is comple~~. Ob~iously, no use of Jevices can
occur except b~tween a sys~~m c6nnaction and disconnection.
When
the
I/O
processor is initially loada~,
assignments vill be made. These defaults are determined
operator at the z1me his system is configur~d.
defcLult
the
by
One other form of the co.mand is availabla to be used for
display of the current device assignments:
RJE-DA
Responses will be of the form:
2I
RJE hfdev
where hf and dev are as discussed above.
~.!i~a ~.bIa:~S!,mi.£§.
The
aforementioned
characteristics:
dey ices
have
I!!.ng,nllg;:
n~§~tig!l
tia! .l!lllll §ii.i
CRn
Card read-::r
JTO
Job transmitter
Line printer
Job line printdt"
40
40
66
67
LPn
JLO
I
5-64
words
words
words
worns
the
follouinq
Iy.!l£1i.2£
r?ad only
write only
write only
read only
JIO
JMO
Job inquiry
Job message
36 words
60 words'
write only
read only
For the JL device only, the first word of each buffer is usad to
supply carriage control information to the BASIC program.
This
inf~rmation
is in the form of a carriage control character
followed bV a null charact~r. The actual print data bagins in th~
second word of the buffer. Carriage control characters for JL are
equivalent'to those for the BASIC CTL construct.
They vill
generally require use of the NU" functio:l in a B~SIC. program for
proper use.
nu..ci!!HI 2ll:l£U12ll§
Let
us
refer
to
the d~vicc ~s~tgn~d to the host reading
Two commands a!: ~ dVililahle for activatinr. If t:his
occ urs, th~ ill&~qe '1,111 b E ~,y Lorad.
Two typES of problems may o~cur at the reader vhich require
operator attention. One type of problem includes the normal
physical errors (such as card jams, etc.) and failure to terminate
a set of data vith the "::" card ima9~.
Should any of these
situations occur, the following .essay~ will b9 issued:
.RJE READER' ATTENTION REQUIRED (bell)
The operator should correct the problAm and
r~ady
the reader.
,The
second
problem area is the d~tection of illegal
characters in the da ta r eati fr om a card.
(This problem can oc:cur
only with card reader devices.) Only valid Hollerith codes can be
read and transmitted to the host system.
If any
illegal
characters arg detected, the reader will halt and the following
message vill be issued:
Bd!
BE~DER1
DArl ERROR (bell)
The o~erator vill find the off~ndir.g card la~t in tne ~tacker. He
may correct the card and r~place it in the hoppar, or he may
ignore, the card.
After taking .s:ither of these actions, he IDust
issue the following command to c~use the reader to continue:
BJE-RR1
All three reader commanc1s (SR, TR, and RR) are inappropriat'e it:
used when the RJE function is not connecta~ to a host.
OSP
at
such ti.es vill result in ~he "NOT APPROPRIATE" response.
One additional RJE command is related to reader operations.
occasionally, when using a 200 User Terminal, the host vill
ter.inate card reading b~cause of some erroneous data found on the
5-66
cards being read. The usual response-is' for the ~perator to
correct the deck of cards, reposition th~ cards in the input
hopper, depress the 200 Us~r Terminal "LOAD" key, and then enter a
command to the host to restart reading. Obviously, the use of the
"LOAD" key is optional, depending on wh~:her card repositioning is
necessary or not. For this HP2000 ACCESS RJR softw~r~, the "L01D"
key is emulated 'with the following command:
BJE-LO
(LO=Load)
It is intended for use only in correcting problems as noted above •
. The command is not needed to effect any initial rE·ading of cards.
Use of the command at inappropriate times vill rd$ult in the
discarding of any cards alr.aady read hut not 'yet tL"ansmitted to
the host.
Of course, this is eXd,:tly th~ dpsired ·action when
correcting problems as nct€ above.
Tvo s~ecial codes are used in card i~aqes for the 200 User
Tar.inal. 'J.'hese are the "6/1/8/9 and 7/8/9 punches. Use of these
codes from a real card readqr is straightforward. Ho~ev9r, if the
JTO ASCII file capability is being us~d, th~ cod~s must be entered
as follovs.
For the 6/7/8/9 cod~, substitut~ th~ Jxtended.string
literal '28. Por the 7/8/9 code, substitute tne ~xt~nded string
11 teral • 30. .
Let us refer to the device associated with host output as a
printer. Whenever data is ready for tra~sfer from tha host to the
HP2000 ACCESS system, it will be acc?pt~d unless some other
process (such ~s a TSB user) currently controls ~h: print9r.
In
the case of such contention, the RJE function will wait until the
printer is relsasdd by the usar befor9 accepting ~ha data from the
host CDC systam. Whenever the RJE function is unabla to allocate
thd printer, this message will be issued:
RJE AWAITING PRINTERl
Except to correct errors and to load forms, etc., the
OpArator's function is largely passive.
If any papar jams or
other "not ready" conditions occur at the printer, ~he operator's
attention will" be required. In this case, he will be notified of
thg problem with the following me~sage:
RJE PH INTER 1 ATTE NT IO N HEQUIR ED
(bell)
A CDC host does no~ necessarily indicate the end of a print
to the 200 User Terminal. For th'9 H£?2000 ACCESS system
this could mean that deallocation of a lin~ print~r by the RJE
op~ration
5-67 '.
-.
function would be delayed. For this reason, two m~thods are used
to release the printer. Whenever th~ host switches ftom printer
to console· output, the printer will be deallocated. In addition,
the ope.rator may force Jl::allocatioll by using the follo"ring
co •• and:
R.JE-TP1
(TP=Ierminate frinter)
One additional co •• ent about printed output should be made.
The RJE software allows a maximum of two blocks of print lines to
be received from the host at any given point in ti.e. If for some
reason, th9 output device (JLO or PRO, ~tc.) does not dispose of
this output, degradation of other RJE functions (card reading) may
occur. However, the op~r~tor will always be able to transmit
co nsol e in put t o t he 1·:; 't: •
This ge n~ ra 11 y c a us ·l s a h0 S t to
interrupt printed o,utput 1..':' vill prevf-1'lt d~adlo.ck situations if
serious output problems should occur.
!u2!! lD.9Jlu'1:l§
~ £2iUL.S§
The CDC system generally has available a set of commands and
inquiries which the RJE operator may UEe. It is assum~d that the
operator bas access to or knowledge ~f the commands be may use.
Por the TSB operator, such commands and inquiriAs. are entered
through the Syste. Processor console as follows:
.
RJE-RC,II
where _ is a string of characters making up one
of the legal CDC commands or inquiries.
Any responses from the CDC host or any other operatoI messages
received at any time from the CDC host will be sent to the System
Processor for display on the. console as follows:
RJE
1ft
where m is the string of
message received.
charact~rs
making up the
The ae com.and is inappropriat~ if the R~I function is riot
connected to a host •. The "NOT APPROPRIATE" response wouid be
received.
The "INT" k~y function of a CDC 200 User T~rllinal is
not directly emulated by this RJk software.
This is because
access to the con.ole is alvays possibl~ even when card reading or
line printing is active. Thus, the HC command may be used at any
time.
5"-68
he
When the TSB operator wishes to discontinue the RJE function,
the following steps:
pe~forms
1.
Enter
follo:ving
the
on the System Processor
command
console: ..
RJE-SD
2.
(SD=~ystem ~i~connect)
Receive the messa.ge:
RJE SYSTEK DISCONNECTED
(T~PE' n)
The lin" in the above m~~c;sa'Je indica;.p.,; t·.he type of ~lisconnEction
that occurred..
This tftes~~a'l'~ may h:.:. r
: iad a t. times unrelated to
the use of an so command. For example, simply hanqing up the data
set without entering SD first 'foul,} r~s111t in a type 1 disconnect.
These types of disconnections are possible:
o
normal
disconnection
operator)
1
line
break
or
other
(a lways
failura
by
i n vok~d
in
t be
RJE
,the commnnications
equ~pm'ent
2
apparent
host
failure (no
rec~ption
from host for two
minutes)
3
power failure
any system disconnect, a new system connection may be
performed. Any repeated use of this command will result in a
repeat of the above response •
Following
.£2.!J!Ylll£!ti2!l§. E"rg£§ ~.22.[:t.
To aid in observing communications line quality,
communications errors may be requested as follows:
RJE-ER,R
(E R=~rt'or ,Re po rt)
wherq
R is an optional parameter described below.
report vill be received:
RJE
RJE
RJE
RJE
a report of
n1 ERRONEOUS STATION ADDRESSES
n2 ERRONEOUS CONTROL CODES
03 CHARACTER PARITY ERRORS
nq MESSAGE PARITY ERRORS
5-6"9
The following
RJE n5 CARRIER LOSSES
RJE n6 MISSING WRITE CONTROL CODES
Each n is a count of the particular ~rror.
counters may
optionally be reset to ~ero when the r~port is requested by
specifying thE R (reset) parameter. The error types ar e:
ERRONEOUS STATION ADDRESSES
tha station addrass contained
in the message vas incorrect or for a non-existent station.
ERRONEOUS
host.
CONTROL
CHARACTER
character.
PARITY
CODES
an
ERRORS
invalid
bad
op~rdtion
parity
on
a
from the
rec~ived
MESSAGE PARITY ERRORS -- LRC character is incorrect.
CARRIER LOSSES -- carrier on signal dropped befora ASCII endof-text vas recognized.
WRITE CONTROL CODES -- write
MISSING
or E3.
.~ssag4
with no E1, E2,
This com.and may be issued at any time and as often as desired.
~O •
.!!!lg ,a..\I!S§.
A real 200 User Terminal uses a CRT for display of console
output. This is obviously a much faster device than the HP2000
ACCESS system console. The CDC host, not awar~ of this problem,
could flood the TTY console with output. For this reason, the RJE
software introduces pauses vhich allow the operator to enter'
commands. This is, in .ost cases, an action analogous to the
effect of the "INTfl key us~d at the 200 User Terminal. The pauses
are approximately 1S seconds long.
E2~~ IAilL&!!~~
If
happen:
a
pover failure
occu~s,
some or all of these things vill
1.
The communications equipment (modem) may lose pover.
2.
Terminal ready
vill drop.
3.
The hQst system will be unable to communicate with the
RJE function of the HP2000 ACCESS system and will
signals from the computer to the modem
5-70
initiate error recovery procedures.
This typically
involves disconnecting the attached remote station.
For these reasons, if the BJE function is active at the ti.e of a
pover failure, a system dis~onnect1on will be perfor.ed on a
restart followingpover failure.
IV.
Operating
specifica~i'bns
B4I~'~ !2~Y1£2menS!
The
HP2000
.
ACCESS
RJE
component
requires
following
th~
hardware:
12618 Synchronous Jata Set
In~s~s~~o~~
'2£
,.
,~r
face Kit
lQ~s!ng
The I/O Processor
Configuration program.
v.
lr~
is
configured
and
loaded
by
th~
Appendices
Appendix .\
aepresentatiYe list of useful CDC manuals
5-71
I/O
~J!!:!!§~nU~in
lis.s
gI ~§!t!ll £ll£
!i.D.!1s.U -
For information regarding the CDC 200 User Terminal, refer to
the following manual. It contains a description of. the termi:nal
hard.ware and general operating procedures. Analogous capabilities
have been included in the HP2000 ACCESS RJE componant.
CDC 200 User Terminal (Publ.ication NO. 82128000)
Por CDC host system operating information related to the CDC
200 user T~rminal, refer to the following ma~uals. In most cases,
these manuals vill contain further references to oth~r useful CDC
11 te ra t ure •
Co~puter
Systems H~ference Manual (Publicat{on No. 60100000)
INTERCOft Reference Manual (Publication No. 60307100)
SCOPE 3.4 Reference Manu-al (Publication No. 60307200)
KRONOS General Information ~anual (Publication No. 60407100)
5-72
~escrietion-!n~ funct~on
The synchronous communications handler (SH)· manages all I/O
on th-3 communications line. Once acti va ~ad, it .aanipulates and
controls t~e trans.~ssion and receipt of data within the defined
CDC U200 Communications protocol • . sa is activated at the request
of· the operator via the BJE-SC command. Activity th~n continues
until an RJE-SO command or abortive communications lina error
cccurs.
SH
will report data regarding line condition to the
operator when di~ected to do so with RJE-ER.
The U200 provides.:.' r the SUt~1 ')rt ot O!l~ card image input
stream, one printer ima~~ output ~rcaam, and remot~ console
op~rator
input/output str~amR~ ~he iUfut streams ara managed via
two distinct SR input work qu~ues. Communications between SH and
its data producers and con~umers follows conventionai handler work
queue exchang4s.
When a system conll~ction .is made, han.:il-:l:.'; 'ar; enabl-:d to
either produce data (input str~~ms) or consum~ data (outpu~
streams).
58 then intertaces with the host systea via the U200
protocol in order to control the flow of data appearing on these
queues.
Addi~ional
infor~ation
about the U200 protocol may be
found in the DSOCD synchronous driver base design •.
l&S!*f!~
S8 interfaces
follows:
direc~ly
with
the
console
I/O
handler as
1.
58 accepts the SC, SD, and EB co •• ands at any time and
the LO command during an RJE session.
These must
appear in console buffers and on the sa control work
queue.
2.
sa
placp.s
.cco.
,messa gas
5H interfaces with
1.
~~
on the console I/O· work queue via
one of its input
modul~s
as follows:
58 places a ISH running' m€ssag~ on th~ handler's work
qusue. This message informs the handler of current SH
par~aeters
and indicatds that tha handler may procGad.
·Contained in th~ messag~ are:
5-73
name - name of SH input work queue on which the
handler is to place its data blocks.
Q~~ue
accepts data blocks [L'om the' handler on the
spE:cified work queut3.
(A HeirJ definition for the!! final
block in a seri~s of blocks is adhered to by the card
im~ge input handler.)
2.
SU
3.
56 may purg9 the handler's ~ork queud if an abortive
line error occur~ and will definitely purg~ when a
normal disconnect occurs. Tue: handler should view this
as an 'SH not running' signal.
4.
SH will place "1 ·.!:t~ command (in a consolE' buffer)
handler's work. 1\11U':' if a .... i..Jf~off i.:; to occur.
is nct true for the console input handler.)
Ofl
t.h~
rrhis
5.
SH will purga the card compression handler's work queue
wh6n it receives an LO command. It will the plac~ an
"SH runniny" m~ssage on the card comprassion handler's
queue to restart the reader.
5H
interfaces with any cne of its output modules as follows:
1.
5H ~laces data blocks on the handler's work queue.
When the handler disposes of a block, it must be
returned to 5H to signal a reduction in that handler'S
queue It::vel.
2.
SH may purge th~ handl~r's work queu~ if an abortive
error occurs and will definit~ly purge when 5H performs
a signoff.
This should be viewed as a signal to
quiesce.
3.
sa will place a TP command on the printer output work
qu€ue if it has bean active and the host starts writing
to the console instead of the printer.
Th~se
local data are used by SH:
eTtQ
holds control 1ueue name
cgENT holds address of current work entry from prime qata
DCENT holds address of current work entry from I/O
5-74
compl~tion
SIaSi indiciates current host communications activity
SIO
I/O activity
Cefinition of
buffer:
sew
'S~
fl~g
running'
Word 2
messag~
Bits 15-4 .
3-0
Word 3
Bit.s 15
14-0
which appears in a control
Zero
cODlma!'ld=3
(un us ~;i)
name
Qu~ue'
(3li
input work qu-aue)
*.Note**. this lIessag~ ;;,
queue using .PRIQ (prio~~l.
Definition
of
a.!~aI'§
pLl("'t;d on
th~
recipient ';.'; work
• PUTQ) •
'end-fil~'
flQg tor blocks appearing on input
wox:k queues:
Bew
Word 2.
Word 8
Bits 15-4
3-0
Bits 15
(ur. us.::.: d)
COIII:U ,1 n .1= 2
O=not end- f i1;i
l=end-fil~
D43finition' of messages given to output
Message appears in a communicationg butfer:
sew
Word 2
Bits'15-8
davic~
,ft E"
handlers
~scap~
code)
7-4
(lIn used)
3-0
comm~\
nd= 1
(data clock)
Word ·3
Bits 15
14-0
(un usaj)
(Ju-3ue nama f')r
r,~sponse
5-75
code
by SHe
Th~
responses to S8 by output handlers must follow these definitions:
BCW
Word 2
Bits 15-8
(nE"
7-4
3-0
Word 8
scw
to
When
messages
Bit 15
escape cede
code)
devit~
(unused)
command=2
(data block finished)
for console output handlers
only, this bit set indica t.es
that a command pauss has been
tarruinated by console input.
s,t us-=!s the indication to
su~pend consol~ output until
~tte= t~e console input
transmission.
are gueued for the cons'ol~ I/O handl'3r, th,cs-=
Their ~urpose is to dllow console I/O
state of SH:
are made.
d~finitior.s
note th~ running
BCW
Word 2
Bits 15-14
OO=normal message
U1=communicaticns
as ta blis h03d
Word 7
13-4
(un used)
·3-0
15-0
command=1
Tables are defined which contain
each input and output stream.
5-76
nl E:ssa ga 1 ~n gt h
appropriat~
data
re9ardin~
For input the
defines each stream:
STST entry
aynchronous
!ransmit
~tream
!able
(STST)
0 - console input
1 - car'd
r~ader
S'IST ::!ntry forllat:
Dll.2
!2~s
0
~Sn.!~D.~.2
permission to transmit requested
15
14-2
1
0
1 C',
1
2
(un used)
• sn running' message needed
perlJlissi on to tr ;:lnsmit .jrant.6d
(unus~d)
1 .'.;
Q I) '."ll,·
15-8
Quau~
depth limit
Stream Escape Code
7-0
15
14-0
3
the Sychronous R.;,ci'i.ve
possible oii'tput sttfam:
.
saST
~ntr.f
o1
-
console
printar
name
(un used)
Queue name for prod-ucing hand16r
~tream
lab1c
(SRST~
dt!fincs -=ach
~utput
saST entry forma t:
~2~g
0
Bits
-1"514-t
1
o
2
1S
14-0
15-8
3
7-0
15-0
1
£.2.n1.5.nS.~
sus Fend console output
pending a console transmission
(un used)
handler suspanded
(un used)
b~cause
of q depth
(un used)
Queue name for consuming handler
Queue depth limit (the maximum number
of i:locks which will 'be receivf:] pr.iOI
to suspending the stream via pes)
Stream Escape CodQ"
(un used)
lwo local data structures are of sp6cial significance. these
are the synchronous Transmit Stream.3 Table. (STST) and
the
Synchtonous Receive Streams Tahle (SRST). The entries in the 5TST
define the possible input work queues. Thd ~ntries in the saST
'"5-77
thd. possible ou~put work queu~~. Contain~d in the tables
paraaeters (flags, queue flameS, ate.) needed to use 'thlese
queues llY.§. all paramet~rs nei::.jed t.u cont.::-ol the produc6rs i!lnd
consumers of these queu~s.
Entrias in 'these tables ar~ usad
sequentially in a priority fashion.
For ~xamplel, the STST is
orderEd as follows: console input, then card input.
Thus, the
console will always have. greatest prioLity. SRST ~ntries are used
in a similar manner.
defin~
ar~ all
To insura availability of communic~tions bufters in order to
prevent de~dlocks and 1n~ure performanc~, four communications
buffers are an assembled part of SHe These four buffers ar~
interlockt!:i to SH with the Sf{ conrol qc-::ue n~lDe in :Jew word 3.
Tha buffers !re managed wit.hin SH u3ing a simplp linked list tor
free buffers. All I/O ~i~h th~ cue ho~t is scheduled into and
from these bufters. They.are giv~n to the data produc~rs (console
input/card input) and consumers (console oUtput/pr~ntar output) by
SH, and ~hese handlers always return tne buffers to SHe 5H
attemFts tl double buffer to th~ print~r and from the r~ajer but
will always hold one of the buffers in reserve fer ccnsol~
communications ~ith th~ ho~t.
In this way, the operator is
assured th~t h-3 can int-:;rvene at any time.
The system initialization entry pc::'nt 1':0 SH is SYNnI •. 'Ihe SH
contIol queue riame is found and saved in CTLQ.
Finally, SINHI
"configures" SH by initializing the STST and SHST tabl~s. This
involves issuing a .FIND for all werk ~udues for assocLated
producers and consumers. The table entri~~ are then initialized.
The priae entry to 58 is SYNH?
SYNHP consists of three main
sections. The first is the entry point section which removes vork
from the control queue and invokes proc~ssing of the work entries.
section tvo consists of a ~roup of procassin~ section~, each of
which processas a control queue work entry. The third section is
an I/O scheduler which is also used by the I/O compl~ta .entry
point "to SHe
Tbe I/O scheduler pe:forms the task of a~amining th~
.STST entries for transmission'or oth~r I/O scheduling.
A s~cond prim& entry point to SH is SINHP. Tbis entry point
receives control whenever any data is placed oft eithar input
stream vork queue (console" or card tra~smissions).
Tba 5H
r6sponse is to er.ter the I/O scheduler for
possible
I/O
initiation.
SlNHP
is
entered
by
a
system prime.
It
then invclkes
on th~ control work· queua.
werk Rntries all r~turn ~o a
entry is released tc its
proc~ssin9 of ~~ch work en~ry found'
Th~
routi~es
which h~ndle th~sa
commcn point ~hare the curre&t work
5-78
buffer
pool if appropriate.
Other work queua entries
processed in turn until none remain.
At this point the
scheduler is entered for possible I/O initiation.
if bese
are
I/O
lIessages may appear on the sa con trol work queue:
~Q. ~~.
~!!, 2l: I i £2!!!lla,ng,§ - the command is recsived'from the
console·I/O handler and is ~rocessed by ro~tine SRJEC.
The
-work entry is in'a' console buffer.
2!SSY! h~!!£ - this is a communications block wbich
was previously receiv~d, has been dispos~d of via one of the
output work yueues, and is now bein1 r~turnej ~o SH by the
associated cohsumir~ handler. Its function for SH is to
signal a reductic..
n the nlilllL,' r of blocks on that output
tiork queue.
SH uses this techniqu~ to monitor the' flow
of
data and use of com;I~f}it;ations t'uffers. SQCHK procassas
these entries and then returns tbe buffer to the 58 free
!!2~
buffer list.
~~a!~n~~!Si2n~ ~~i~iI - communications buffars relaasarl
due to putge processing at system disconn~ct ~im~ are add~d
tc SHes freE: buffer list. SCOMS (-rocess€:s this. work entry.
1'2~
~ll~at~'
£2nsgl~
~~!!!I ~ cecaived from the buffer manager
in belated respons~ to some previous request for a console
buffer. SCONB processes th6 entry.
sl!2£l~~
£2ni£9l
~~!~£
in belated response to
buffer.
a
-
received from the buffer manager
raqu~st
for a control
previous
SCTLB processes the ectry.
wort entry processing by SYKHP is as follows:
.§g£]! - locates tha SRST for tnt) associated. output stream and
determine the current Q duptb.
If the stream 1§ n21
srisp~nded,
release the h~ffer. If thd str~am i~ suspended,
decrement the count and
to th~ host.
~£QM
~se
this tuffer to signal "go
- the buffer is adled to
.tht.; tr-ag
ah~ad"
buffer list.
SCI~B
- if the syst&m is not online, the buffer is released.
Otherwise, it is ~uppliej to 5HRUN for the issuance of "SA
running" messages to available producers at inpu~ work queue
data •
.3~mm
-
Tne bufter is supplied to .ceo. for console output.
5-79
~&l!£
for an EB cOII.anel, the data is acquired and the
are constructed and issu~d. Por an LO command, the
ieader handler is pur9~d and res~arted (with "SH running") to
effect a fresh card transmission.
"~essages
For an SC command:
1.
If 5H is online 2I not online but Gnga9~d in going
online, the 'SYSTEM ALREADY CUNNECTED' message is
issued.
2.
If 5H is ndt onlin~ An~ is not goipg online, the SC
data ~tation adiress and mod~ are procdssed. Then th~
signon activity signals ~te set, the 'SystEK READY'
message is i$ .. :"!d, and
til-::
data linlC: enab16 1/0
operation is started.
For an SO ccmmand:
1.
If a siqnoff
ignored.
is
2.
If SH is not online or engaged in a signon, the 'SYSTEM
DISCONNECTED' massage is issued.
3.
Signoff conditions are establish~d and a disconnect is
forced immediately.
alr~ady
in prograss, the command is
All I/O scheduling (~xcept tor the initial data link enable
and terminal clear) is performed ~y 510. SIO is entered by SYNHP
when control" work guaue is ~xhausted. 510 is also used by S~NHC
to initiat~ successive I/O operations. If I/O is active when 510
is ~ntered, it ex~ts to the centr~~ system commutator. Otherwise
it petforms the following sequence of steps:
,.
If SH is no ionger online, SPRGE is entered to clean up
all queues, etc.
2.
Nov
5IOSW
is
inspl!ct::d to" determine if th~ host is
If not prOCeed to step 3. Else:
waiting on input.
A.
inspect the inpu~ vork qU~U9S
a data block to transmit. If
issue a r~ad request.
B.
iDit1~te transmission of th~ first available data
block and assign n~w communications buffer to~he
5-80
(consol~
ncc~ is
first) for
found, then
reader.
transmit
3.
If an end of fila is indicated the STST
flag is claared, then exit.
permissio~
If no work queues are acti ve .a.nd a signoff is pending,
a disconnect is performed.
Otherwise, a read is
issued· •
. ·SYNHC is the I/O complete entry peint to
follows:
SHe
It processes·as
1.
I/O activity flags arc cleared. If any ab~rtiv6
has occured, SPRGE is dntered to clean up.
2.
If the·
invoked.
3.
the oparation is a successful connection, SH is
placed· online and the 'COMMUNICATIONS ESTABLISHED'
aessage is issued.
If a signoff has bean requested,
the disconnect ~ection of 510 is invoked.
Otherwise,
the 'SH running' control signals are issued to all
associated input handl~rs u~ing sHRUN.
ij.
If
o~t:rl"'ion
~rror
completing is a disconnect, SPRGE is
If
it
raq~est
is a completed tr~nsmit/recaiv~ sequence, the
type is then examinad.
A.
if the host
enter SIO.
is
B.
if
has
the
host
re~uestin9
output
input, set SIOSW and
data, locate the ·sRST
entry and engue the data block to tha appropriate
handler's work queue. Than if q depth limit has
been reached set the suspe,nded flag and exit. If
the maximum depth has not been reachdd, tell ehe
host to go ahead by~
a.
transmitting a
~ending
console message.
or
b.
acquiring
a
communications buffer and
initiating a t.ransmit/raceive operation.
Then exit.
s.
If the I/O t3vent is an ALERT or an unsolicited attempt
to write by the host, a communications buff~r is
acquired and a receive ~nly ~peration i~ scheduled.
5-81
SHRUN is a subroutine used to present signals to associated
input handlers informing them of SH ac~ivity and parameters.
It
searcbes for marked STST's requiring this signa.l, and transmit,s a
message to the handler containing its intend~d input work queue
name.
SHRUN is invoked either by SYNHC following a signon or by
SCTtB in belated response to the request for control buffers.
SPRGE purges all input and output work queue3 and associated
handler qu~ues. It resets SH to lnitial conditions, and issues
the • S XSTB~ DISCONN·EC'I' ED' l1€:ssag.;.
Finally , it clear s the purge
indication from all SH work gueues, clcses the SH prime gate, and
exits.
5-82
~~ £s~~~ ~2!R£~§!i2n h~agl~
I2.!..§£.tiJ21ion~n.L.tllp's;tiQn
This handler (CRC) allocat~s and manages a card reader
handler or other similar data source in ordgr to pre-process the
card data for the synchronous communications handler.
Preprocessing involves blo~king card imag~s into the acceptabl~
comaunications format. CRe is a level 2 func~ion handler, and its
interfacing to a card r&ader handl~r follows the lavel 2 - level 3
protocol.
CBe
lltili zes its a!.. . ,
ted rec1
(from length>
JSB
• COMP
DEF
(to addr>
is the byta addres~ of the data 'to be add.:.ad. to
the buffer.
(from length) is the numbar of bytes of data in tha record to
(to
addr>
addrj
be added to tb~ buffer~
1s th~· byte addres~ of the
This address must point to
location in the buffet~
d~stination·
th~
first
buffer.
available
Upon return, the B-regi3ter will cont~in the byte addr~ss of
the next available
location
in
the
destination
buffer.
Comprassion consists primarily of moving th-e card image to the
dastination buffer. The occurance of 200 User T~rminal end-ofrecOrd or eni-of-file codes in the first by~e of the scurce card
image are ancoded with the pro~er preceding escape code before
moving the card image to the buffer.
• DCO!
com pr·~ssed
provides a data deCOmpr€5Sion s~rvice to ~xpand CDC
records into uncom~r~ssed format for
unit-record
devices.
5-90
the routin~ is ~ntered via a JSB with calling parameters in
registers and following the call. It will rdturn . two values in
~egisters.
The calling sequence is:
LDA
LOB
.ISS
• DCOL'!
DEC
addr)
is
the
decompress~d.
address
of
·This must be the
tha
data
address
to
of
be
the
first
cha:acter following tb~ format control
charactE":.t
is the byt.a addrass of the destination of the
(to aJdr>
decompress~d
is the positive byt~ length of the buffer to
receive the decomprass£d record.
Upon return the registers
A-register:
B-register:
source tuffer •
Leng~h
~ointer
~ill
ccctain the following:
of deco.pressed racord (1 if 20F record).
to
next
format
control
character
ir.
.!!~:
If there is more da~a,in the compressed record than is
available in the buffer, excass data will be truncated.
Th~
length returned will never be greater than .
·5-91·
NOT!: This document assumes knowledga of tne HP2000 ACCESS Queued
IOC module and Cootiol Data Corporation's (CDC) telecommunications
protocol used with the 200 Oser Terminal (200UT). Th~ following
CDC manual3 are recommended fer additional ·information on the
protocol.
TlLase· manuals dascribe ir detail the actual hardware
emulated by this software.
200 User Terminal Hardware Heierenc~ Manu~l (Pub. No. 82128000)
217-2 Equipment Controller (Pub. No. 82128100)
I.
Eroduct Identification
The C50CD driver int~~~~ ~D 21.00 ~ :rie~ cowput~rs to a remot~
contlol Data Corporation CPU via a
dial-~F
or
dedicated
communications
line.
Th~
line
disci~line
is bit serial
synchtonous and the link ~rotocol is that smployed by the CDC 200
user
Terminal.
The drivar assum~s th~ use of the 1261A
synchronous interface kit.
II.
Design Overview
. .Q~ ~ ~ S.n .s!,§J1!2!~!!.§
program requires the microcode d~signgd for usa in the HP2000
ACCESS I/O PrOCEssor. The driver also requires thi: D.43 tilDe bast;
generator driver.
Th~
ordEr to avoid loss of characters on input/output
the interface boards should be placed at a relatively
high interrupt priority.
This does not mean the driver uses a
large portioD of available CPU tim~, indeed only a few percent of
CPU cycles are taken by OSOCD. It does mean that the interrupts
do need to be processed quickly.
NOTE:
In
operati~ns,
DSOCD is an input/ouiput 1river d~sigDEd to operate in the HP2000
ACCESS I/O Processor. The following funct.ions will be perfclrlled
by C50CD.
I;
1.
CLEAR
2.
READ
I
resets all status words.
hook" con·li tion.
'
Puts I/O
boa~d
in "on-
Accept a! block of dat~ from the host system.
Error dltecticn and r€portir.~ tc the host are
autcmatically handled~
5-92
3.
WRITE
Send a block of data to the host. As in the READ
operation, error detection and reporting to the
host are. automatically handled. .
4.
ENABLE'
Allows the communications line to be established
by answering the phone or by .operator .anual
dial. Certain operating parameters are passad to
DSOCD via the ENABLE call •.
5.
EXTENDED
Accumulates
statistics on
performance during a terminal session.
STATDS
device
NOTE:
Th~
WRI~E operation may be either a straight,vrite to the
host or a writa/read; in the case Of a vritu/read operation, after
data is written to the host, the hutfer is USed to receive data
from the host.
The
driver is composed of two fundam~ntal units: the
initiator section and the continua tor section. Each of these tvo
sections is further modularized to 'handl~ . the various driver
functions. Each module performs some specific function ("read" or
"write") or common "service functions" (code conversion, establiSh
synch~onizat;on, send character, receive character, etc.).
the initiator section sets up service .r-aC)U9Sts for the
continuator section. The requests' are for either input (read),
output (write), or output/input (write/r9ad). The continuator
section raceives aessages from the host and vhan possible,
satisfies the requests made from the initiator section. It must
be noted that the driver is rdsponsible for maintaining the line
protocol.
It is the rgsponsibility of the calling program to
ensure the proper message content and sequenc~; DSOCD has no
knowledge of the messaga content.
When a request is made from the calling progtam to the
initiator section' of D50CD, a check is made to see if there is a
pending re~uest.
If so, the call is rejected. If th~re is no
pending request, the request is passad to the continuator section
for action.
(Passing th~ request consists 0 f setting flags in a
co~mon data structure.
Obviously, tpis must be done in a·disabled
state.)
the cont~nuator sec~ion of U5QCD monitors data source (host
system) measages and polls and satisfies the initiator section
request appropriately. In the case ot an input operation (read),
the' conti~uator acknovledg~s any host write operation and fills
5-93
the caller's buffer. In the case of an output (write) operation,
the data is sent to the host all the n.ext POLL. In all cases whare
thare is DO input buffer, host writ~ messages are rejected.
Likewise, when there is no o~tFut buffer, host POLLs are rejected.
For a complete understanding of DSOCD, the operation of the
continuator section of the driver must be undarstood. It is here
that mest of the e~ulation of the 200 User Terminal c~mmunications
Frotocol is done. The operation of th~ continuator 'or interrupt
handle~
portion of D50CD is completely ind~pende~t of almost all
other activities
the system. It is totally interrupt driven
and communicates with the host system all by itself, ~ven when no
I/O (LaS hQdn rt!lqu~sted by the callil~q
program., This interrupt
handler
switches
bac~
~nd
forth cetween transmissions and
receptions, controllin\j bli .. ,. interfac - uoards a~ retjuirad.
in
All acti vities begin at tl.E label INPUT where receive
operations are initiat&d. A real 200 User Terminal is normally in
a receive mode, waiting for the host to indicate the next dasired
action. ~hat is, the protocol is a polling/selection type of
protocol. and, ther~fo:~i the terminal (driver in thi~ case) must
be directed through each action by the host. During any of the
actions being perfor.ed asynchron,ously by this interrupt handler,
the initiator section of DSOCD may' cause various buffer addresses
and lengths, et·c. to be set.
These will be noted by theinter·rup·t
handler for action at apptopriate times.
When a receive operation irom thd host begins, the common
message header is fi~st analyzed character by character.
It the
inco.ing message contains a site address other than the one
designated in the ·ENABLE operation, the reception is ignored.
This woull make multidrop operation possible. Normally, however,
the message is accepted, and the message control code vill be
detected. This causes dispatching of a routine designed to handl~
each incoming message type •
.fQll.L
If the initiator section has scheduled a read cperation,
then it is out of phase with th~ nost. Such a read is terminated
with !·QT status of 1.
(Thisfeat'ure of the driver allcwsi the
calling program toattemptto.anticipat~ ho~t input at times when
no other 1/0 is indicated.) If the initiator section has scheduled
a write operation, the correct message headar is transmitted to
th~
host, followed by the data supplied by the call~r. Finally,
the trailing ETI and message parity codes lre ~ransmitt6d. If the
calling program has indicated a write/read op~ration, the read is
now enabled.
5-94
!iIll -- Diagnostic writes fro. the host are not supported by this
driver. 'All other forms of vrit~ m6ssages
are
processed
identica~11.
If the calling pro9~dm 'has not ~cheduled a read
operation, 'the incoming mess~ge is still scanned to a~ter.ine the
a~sociated
"E" code.
~his 'is
then passed.to the upper.leyel
program in the form of an unsolicited event.
Then .the host is
responded to ,with a REJECT aessage. 'Howcvar, if a read operation
is active, the incoming data is b~ffer~d an4 checked.
If no
errors occur, a completed I/O operation is returned .,ia .BUFi.
Then the ~ost is sent an lCI aessage. The d.tection of any error
results in the trans.ission of an ERROR message to the host.
If a calling program read oFeration is active, the host
is sent an ACK messAge. If no read o~~r~tion is activ~, the upper
level program is shown 'the occuriDce of the ALEST with an
unsolicited aessaga.
AUi~
~2gs S.211;U~s j,o ll§ ~
1QQ.UI
!.!lI1Sl.!2~
the 200UT emulator operates internally in ASCII mode. All
buffers transfer,red between the dri vet· and the caller are in
ASCII.
The central system may use ~CD (internal or external) or
"ASCZI). The former requires code conversions be done on received
and transmitted data.
Received data (INTERNAL or EXTERNAL BCD) is translat.d via
translate tables (INTAS, EXTAS) to ASCII.
Transmitted data is translated from ASCII
tables (ASINT, ASEXT) to Internal or External BCD.
via translate
In addition, conversion of inbound codes following an escape
code are converted to ASCII using tables lASES and EASES if a nonASCII code is in use.
5-95
III. Design Structures
Puts the I/O board in "on hook" co~ditiJn (drops data terminal
ready). Clears all status word's '~xcept "cxtcnd:d status".
JSB
OCT
No rejacts
• IOC.
OOOOXX
ar~
where Xi.
i,;.;;
lcgica
~
u;,it numbJr
possibl~.
1.
Turn off data tarminal
2•
C1 ear the d ri ver and re S~ t t
3.
Clear status word in EQT.
4.
Disable 1/0
r~ady.
0
i
~ll ~
s tat a •
int~rface.
NOTE:
CLEAR
is iS3U~1 to t~rmin~tA all activity 6n the
communication link. Th-a CLEAR should cnl y b·~ issu~,j afte, all
operations are completq (no outstanding r&~ds or wri~es).
5';"'96
ll.A]
DesQ'i~i2n_ang
runGti on
Read a bl~ck of data from
detection on the incosing data
The ~ollovin9 conditions
sent to the host system.
will
1.
Nonexistent Station
2.
Station
addr~33
th~
bl~ck.
hest
system.
Execute error
result in an error message being
of 1ijO or 160 in
al~Y
mc::.:~ ..;a;J-='
other than
POLL.
3.
Unr9cognized message control
q.
No E code or erroneous E code in message.
5.
Word parity error (in auy chdracter).
6.
Message parity error.
7.
Carrier dropped before EOT cr LRC cnaracter received.
cod~.
JSB .IOC.
XX is
OCT 0100Xl
wh~re
aeject Address
Buffer Address
Buffer Length
( po si ti ve byte s)
the call may be rejected for
1.
2.
~he
unit number '
logi~al
tollowin~
Terminal "off-line" (E valti£ not
Driver is busy_
reasons:
compl~te)
Notes:
transmission loy
characters rac~ivej.
wi 11
rafl ect
a)
ThE#
b)
The transmission log includes the control
the site addr!ss through the ETX character.
c)
A buffer
error.
ovarrun
will
5-97
b~
treat~d
tha
a~
:lulI,ber
cod~
of
after
a carrier loss
d)
If an o~eration ether 'tha~ ~NITE or ALERT is received
from the host, the rea1 op~ration is terminated with a
status of 1 in the DSOCD EyT. This indicates that the
read operation is inapprcpria~e for host activity and
allows the caller to alt~r its I/O operations •. ~rhus,
when no other I/O can b~ schadule~, a read operation is
al ways safe.
,
1.
Await a host POLL oparation.
2•
ae c e i
v 13
and
n:1f f .:; I.
messagE. pariti '"''''
3.
3
t h~·
ddt d
t rom
per chtract-=!'
t. h € L
ba~i:-{.
0 ~ to ,
.
(~c Her ii tiL g
LHe on receiv10g mi5sage parity character~ If
th6re is a parity error or any .othor error mention~d
above, send an arror messag~ to th6 host.
Ch~ck
Read is the op~ration issued in reslonse
messaqe or ALERT messag~.
5-98
t~
a
h~st
system' WRITE
}JRlli
D!',§£Ull:S~QJl..AD.d
F!lna12.!l
Sends a blocx of data to the host system.
ln~!I!s¥!-Q!§~Iiet~2D
JSB
OCT
• IOC.
1)200XI
where xx is the loyical unlt,number
~'-~
Reject. Address
Address of Buffer
Length of B uff,er
~be
1.
~.
call may be
Termi~al
reje~'
d for
tb~
fOllowiLY
r~asons:
"'off-line"
Driver busy
NOTE:
Tha caller must supply only data in the tuffer through the
associated "EU'code. The drivar will supply th~ messaga prefix
and t~ailing EfX coda.
'5-99
!HUIUB~
~~IiR!i2n_!Ag_lYnctign
As
the WRITE operation except th~ writ~ buffer is used for a r&ad
at the termination of the WRITE.
op~ration
JSB
.IOC.
CCT
0210lX
lieject address
write Butfer addr~5~
Length of writu buffG~
where XX
i~
th~
logical unit number
The call may be rejected becaus~ th~ dr~~er is brisy or the
terminal is "off-line". The rdad length is always assu~ed to be
1040 cbaracters. The read buffer is th~ same as the write buffar~
Therefore, any incoming data oVArl.lYs. th~ orig :"nal writ~ data.
The write vill send data to the best in responea to a POLL from
the host. lft~r all da~a is sent a read ~s p~:forme~.
The r~a~
accepts da~a from an incominy host WRr~E mess~~~.
NOTE:
Tha driver doas not
suppor~
writ€ dia'}nostic oparatiolls.
5-100'
!~l!1t!
~~~~!pt~on_~L~runSl19n
Establishes the communication line for the ~erminal.
eith$r lIanu~l connections or auto answer conn.ection.
JSB
.IOC.
OCT
0220XX
Reject address
Buffer address
Buff~r lengt h
where IX is thp logical unit number
BIT 0 = 1
Word '1:
BIT 1 = 1
BIT 2 = 1
BIT 8 - 15
The call can
b~
Operate in ASCII mod~
in In~=rnal BCD mo1~
operate in E~ternal BCD mode
Operat~
S l'rE ADDR
I:;~S
rejected for the following reasons:
1.
2.
The"terminai is already "on-line".
The driver is busy.
1.
2.
Prime the I/O board.
Wait for carrier from modem.
Enable host receive op9raticns.
3.
, 5'-101
Allows
~ll~!ti!I!!..a.!AI.Y~
~!§S~lB1i2n_an~_~~
The use of this call is to pass ~tatisticson the interface's
perfotmanca during a terminal session.
JSB
• IOC.
OCT
0120XX
where XX is thg:loyical unit Dumber
Beject. address
Buffer address
tEe
6
After this call statistics ~re kept in
vordin tha calling parame~Lr list.
th~
buffer
The call should be made before the ENABLE call
caller will never be rejected.
1.
addr~ssed
i~
by the
issued.
The
The following ~tatistics ar~ maintained in the storage
addressed by the reguestor:
~oRD
1
WORD. 2
WORD 3
WORD "
WORD 5
WORD 6
WORD 7
erroneous sta~ion address~s
erroneous control cod~s
character parity error~
messAgE parity errors
carrier losses
missing write centrel COd6S
cod~ indicating type of line drop
(O=clear reques~, 1=loss of data set
ready condition, 2=failure to receive
any data from hcs~ for 2 mi~ute period)
(see the project ERS for amplification).
Notes:
Whenever a call to D50CD is rajected the following return
codes tilll appear in the "A" and "BI1 rE:gisters:
,
B
Raason tor
o
IllE~yal
1
1
1
A
"00000
R~ject
rl3quest
Terminal is otfline
Driv~r
5-102
i::i busy
~n~li~iteg_lX~n!!
The following
unsolicit~d
6vents are
d~fined
for D50CD.
ALERT received
A=logical unit number
B=000001
WRITE received
A=logical unit number: .
B=000002" (also, bits 15:8
ccn~ain th& ~rit. message
.. En code)
LINE DROP OCCURED
.
A=logical unit number
B=OOOOOO
In the case of an unso~icited write operation the driver will
reject writes (station busy) until ~ read operation i3issued.
The dxi~er is completely responsible for line quality monitoring.
the monitoring is accomplished by th~
alternating
station
addresses in messages received from the host •
.,....
All data passed to .CSOCD is assumed to be ASCII. All data passed
to the cal19r is also AS~II. Code conversions are don~ by D50CD
froa/to ASCII and IH1/EXT BCD.
Summary of DSOCD IOC calls
f.Yl!£llflB
00
01
01
02
~!!'§!y~U5U!
00
00
20
00
gllJAIIQ.tl
CLEAR
READ
EXTENDED STATUS
02
10
WHITE
WHITE/R EAt
02
20
ENABLE
·.5-103
i~1!!!l!
Immediate
Asynchronous
Immediate
As ynchronous
Asynchronous
Asynchronous
SECTION VI
PROBLEM ISOLATION
PRUBL~M
ISOLATION
Un~ortunatelv, there Is no one way of localizing any problems which mlqht occur In the lOP. However, tracks dO exist
Which could help you in localizing the bug or posSibly solving
it. Outlined In the tollowing paragraphs are essentially those
tracks which YOU can check to, if nothing else, eliminate certain
modules as suspects.
'
,1)
LooKing at the entry pOint of .GETQ
This will qlveyou the handler who last got something from
his work queue.
; 2)
In addition, entry points of .PUTO, .PRIO, .FRER and .GETS
give YOIl the same type of information.
3)
Due to the nature of power fail recovery, the I.XX entry
ot all drivers ~ll1 be cleared. Hence, If a HLT 2
should occur and the I.XX entry point of a driver is nonzeta, then he was the last one In control and most likely the
cause of the problem.
p~lnts
There' is one exception 'to this rule. The interconnect kit
driver 0.61 contains the code to process a cold dump request.
As a result, If a cold dum~ is taken, the 1.61 entry point
and some OMA r~lated information get wiped by the dumping
process. Since this data is recoqnlzed as valuable, the
dumping routine saves it before executing. The information
can be found within 0.61 as follows:
KSNI.
contents ot 1.61
K~NI.+1
OMA routine return address
KSNle+2' DMA buffer address
KSNI.+J OMA buffer lenqth
4)
There exists a trace table of SP to IUP communications,
(entry pOint D.b15 in O.bl). This will give you the last 50
ICK transmissions. You cannot conclude, that the last th1ng
received from tne SP was the culprit, remember many things qO
on a~ynchronously. Its just another source of information on
wh~t~ happe~inq in the syst~m at the time of the crash.
5)
The entry point ot .IOC. will show who was the last to cross
the bounQary from system (handler level) to I/O (driver
level).
b)
QIT entries will show you what·s pend1nq on the work queues
of all the handlers. ~hat is on the work queue can almost be
eliminated from the cause of the prOblem by the fact that the
processinq thPV invoked has not yet taken place •
. 6-1
hav~
7)
The CRO will snow YOU what 1/0 f'vents
not yet been processed.,
completed but have
H)
F:OT entries 'Alill Yield information about all DR\)·s: whethpr
a cievlce 15 StlspenlI~P
ANAI,'iZF~
LI~T
WOHl>,
o
1
2
J
'4
5
b
7
k
9
10
11
12
13
14
1~
16
17
tt=t
lY
20
21
~2
iJ
24
2~
26
'1.7
dnte code
reqlster
rA ,11 s ter
Fl~qs - bit 2
1nt sys status
bit 1
E register
,
bit 0
0 reaister
F r~qlster (register save stack pointer)
p re.gister
= 0 info saved when PANIC executed
# 0
Info sdvert when D~ATH executed
and this is address tram Which
it waS" call1~d
D~f .OAT
address at device dssiqnmenl taol
DEI"' .DVTH
arldress at aevice tdhle
I.)ff" ,VITAl>
address of <.>IT·s
DF:F PULPl'
atidrsss at Senl, list
Dt-:t-' O)'llP
nddress of (').43 TOt:; Chain heaci
Dt::f LlIT51
address ot U.S1 unit tables
Dfo:F L,OTht
address of n.61 unit tables
0":1-" Ur.'J'OO
address of n.ft3 unit tables
I>EF' SIBIK
address of lCKH unit tables
n~f StRAY
address at A5YH unit tables
DEf D.btS
address of D.b1 trace pointer
I)F.~' rTPTR
address of main trace pointer
DEY CPO
address of .IUC. CRQ he~d
D~ . F 'QHEAD
address at .IO'f. tree storaqe
OfF 51'ST
address ot SYN(IH/CD) tables
D~f P~TR
address of MEMRY tree list
OEF EOT
dddress of equipment table
Cnp~ of lOPC·s .MOPT word
AriJress at tirst hut fer in pool 1
Address ot last bufer In pool 1
A~rlr~~s of first outfer 1n pool i
Aadress at last Ol1ffer in pool -;.
lOP
A
H
=
=
=
6-4
If a cold dump analyzer Is available, it will use the above
1 1st top r"i n t 0 uta 1m os tall the tab Ie s and t rae e sin the lOP
in a neatly formatted listing. The interrupt trace table Is
not broken out by the analyzer. The other two trace tables
are, with the most recent event printed at the top of the
. ta·b1e.
6-5
SECTION VII
lope
I.
Product ldent if ication
lL2 il:SS!H2..-:
n
CO 'ig~~~~ jlQ~l
The purpose of. this program is to configure I/O Processor
(lOP) programs for the .HP20 CO ACC~SS·· systems.
Since· the lOP
program can contain various compon9nts and .features, a techn'ique
is required to selectiveli,lcad and merge needed modules to make
up the lOP system desired by the user. SOllle of the possible
features which may be configured are: number of rSB ports, IOP
memory size, 2741 support, ASCII files support (line printers,
card readers, tape punches, EtC.), and RJE access to various hos~
systems.
A secondary purpose of Iope is to perform loading (reloading)
of the lOP.
II.
Design overview
ge!JaSll
.A§!y.!nJiQ~'§
IOPC is not .. a stand alene program, although it is written in
absolute form. It is one of several 'programs whic~ ,are used to
configure complete HP2000 ACCESS systems (the others being the
7900 loader, 2883 loader, etc.). Tne MCP or Master Configurator
Program controls the loading and invocation' of the various
configuration routines. . The ftCP contains I/O drivers for the
system console and magnetic tape units.
lOPC utilizes these
drivers and several oth&r parameters and subroutines in the !CP.
One special capability of the MCP is the application of "patches"
or "fixes" to the program binarys which it readSe While this 1s
transparent to lOPC, it do~s allow the application of such patches
to the lOP program which IOPC creates.
The
entire
HP2000 ACCESS system is distributed on a master
one of the tape is tha !CP.
A 8.al1
bootstrap program is used to lead and initiate the Rep. The MCP
then can load lope. Each master tape file after the first (~CP)
is identified by a fila jd record.
Within the file, groups of
binary records are identified by group id racords.
The antire
file is terminated by a file end id record. The purpose ot these
id reco~ds is to allow MCP tc identify files for tape positioning
and to identify binary records for the application of patches.
IOPC is only ccncerned with the file id records for the files
which it uses.
One file is the standard modules file.
The second
ls the optional modules file. Third is the rop core image file.
A complete outline of the files and file id reco~ds assumed by
magnetic tape.
File
7-1
rope ~ay be fotind in Table 1.
filas will follow.
Further details on the use of thes9
Other design assumptions for lope are:
1.
2.
select code 11 is assumed to be the trans.it channel
interconnect kit interface to the lOP •.
Salect code 12 is assumed to be the system console • .
7-2
I12
n.£2n~
follcwing form:
15
tab,a 1
is exactly 5 words 10D9 and has the
ID
An
14-12
reco~d
11-9
5-3
e-6
2-0
r-~-~~-~~~~~-~-~~~~-~~--~~~~--~~-,
10
0
·1
101
'0
10
J----- ----~-.. ----------- - ..... - ..... -~-- ... .----I~
10
0
2
101
0
J 1, I
I------~~~~~~---~----~~~-~~-~~~--I
(id number)
I~~--~~~----~~~-~--~~-~~~~~~~~-~-I
I P
. (info. wcrd)
.
(checksulI)
Tha ID number is an unsigned 16 bit positive integer (0~n~6S535).
Pile ID numbers must be a multiple of 1000. The information word
does not apply to ID records appearing on the master tape. This
word is used on patch ta~es only (see ~CP).
The "P" bit
designates a relocatable (set) or absolute (clear) group of binary
records. An ID record can be assembled as follows:
OBG 2001 E
IBS IDVAL
DEC 0
ass 1
A~~~~
~!E~
~gsni!A!i2n
At the time of this docuaent, the
master tape had the following file organization:
lilt.
1
2
3
"
5
6
7
~gn~111.§
MCP
lope
Std. top modules
Opt. lOP modules
7900 Loader
2883 . Loader
8
7905 Loader
TSB system
<)
lOP copy file
IllL1J2
none
1000
2000
3000
10000
11000
12000
20000
65000
ii~
At the timE of this
organization of lOPC related files was:
!Qf~
lilLl~
1000
~.9!!ll.n!.§
IOpe pr 09 ram
7-3
l.2n~!
absol ute
absol ute
relocatable
relocatable
absolute
absol ute
absol ute
absal ute
absol ute
document, the master tape
2000
3000
2010
2020
2030
2040
2050
2060
2070
2080
2090
3010
3020
3030
3040
3050
3'060
3070
3080
3090
3100
3110
3120
3130
31QO
3150
3160
3170
3180
3190
3200
3210
3220
3230
3240
3250
3260
3270 '
3280
3290
,3300
3310
3320
3330
3340
3350
3360
3370
3380
3390
ftN
DUftP
'ISGH
IeKH
"OXH
ftE! RY
IOC
Dil3
D61
D51S
DS1A
D63
D62
DSOIS
DSOCD
0110
0120
0130
D140
0340
D11C
D12C
D13C
D14C
D34C
• 2741
.274E
.274C
!SHBIB
rlNRCD
WCSL
004
lSPH
SYRIB
SYNCD
CIO
CICIS
CICCO
ceDIS
CODeD
CCOIB
ceOCD
PDOIS
peOCD
PPO
CRO
PRO
RPO
7-4
3400
3410
3420
3L130
3440,
3450
3460
3470
3480·
3490
LPO
PUOIB
ceCIB
CCCCD
PDCIB
P·DCCD
cae
LPC·
PPC
RPe
- The orda!: of t h.t:! binary groups in t he standard
and 3000) is not random.
Modul·es in the' standard mcdules f11-= are UJ!A.I§ loaded by Iope.
This is true even if the module can not be identified by·Iope (see
.NAMT).
Further, it is required that th~ first module in th9
standard modules file be the ftN or managers modulec
This is to
insure its lQadinq at location 2000 which, in turn, assures the
documented start addresses fer PANIC (2000) and the lOP to Iope
lQ.f~
1§§J.lI9.tl1~§
and optional modules files (IDs 2000
unloader (2002).
Not all needed modules are in the standard modules file.
Even a minimum system requires loading of the appropriate D.S1
module and 0.04 module from the cptional modules file. Generally,
the modules in the optional modules file a~e ones which ar~
va~iant in some wa~
Some dEtai~s about this file are:
10
2.
0.04 must follow ill dri'ver modules.
Variant RJE modules are assumed to have names (HAM
records) with the last tvo characters indicating the
version (e.g. IB for IBM, CD for CDC, etc.)
7-5
na§ign
A££~2i\~.h
IOPC has three distinct processing sections. First is the
system configuration dialogue. During this section all questions
about configuration are ask6d.
The operator's resFonses are
~nalyzed.
The outcome
is
the
establishment
of
various
configuration parameters and control blocks .which vill determine
further processing.
.
The second section of IOPC is essentially a relocating
loader. ftodules are selected from the master tape as required.
These are relocated and linkEd together to create the IOP program.
In addition, a number of binary module modification processes are
al~o
involved.
The purpose of these processes is to contruct
ne~ded IOP control blocks, buffers, etc.
Also, such things as the
merging of select codes into I/O instructions can be done. 1
final function of section twc is to create an optional ccpy of the
configured IOP prograa.
.
Section three of lOPC produces a aemory map and report of the
configured lOP prograa.
III.
Design Stucture
.Qsis
Jl'-Y~~U'§
·Several control blocks and parameter lists are used during
the configuration Frocess. 1hese are outlined here.
This table, located en base page, contains most of the
configuration parameters. While it does contain so.e default
values, most of this table is filled in as a result of operator
sp~cifications during: the systea configuration dialogue section.
!2.£,dj.§)
!Au
9
II
1
·2-33
34
1t!!S
'. SP N
.fiPBS
• flO PT
highest me.ory address in lOP
zero relative Dumber of ports (default is 31)
,TTY buffer size for each port in words
(defa ult is 60)
optioz:s flags:
Dit l1UnlIHl
15
2741 fBCD code
14
2741 CALL 360 code
12
IEI' RJE
7-6
11
1
35
36
37-43
44
45-51
52
53-59
60
61
62
63
64
65
66
61
68
69
70-1
• PlSeK
• KHBD
--~~~
---_.-
• f!H tD
• ftH PO
-------
• KACR
• !lLP
• "APU
.!ABP
• MAPS
• KCNT
• JT.
.JLt
II)
JP'
• !APN
• lIASF
CDC RJE
create master tape lOP copy
o
create separat e t ape lOP co1=1
hiqhast used select code in lOP
.
number of host readers (default is 1)
devic~ assignments for host readers
nUBber: of host line ·printers (default is 1)
device assignments f~r host line print~rs
number of host punches (default is 0)
devicE assignments for host punches
numb9r of card readers
n ullbe r of line printers
number·of tap~ punches
number of· r~ader/punch/interpreter
numh9r of photo-readers
number cf IOP' modules to be loaded
number of job transmitters
numb9J: cf job transmitters
numb9r of job transmitters
negative numb~r of ASCII files
3-vord ASCII file apecifications:
!!~g
o
1
2
~,gDtent
device designator
15: 12 ch a racteris tics
7: 6 subtype
5: 0 sele ct code
record size in words
~~2£~ 11l2~ali2n Iabl~
This table keeps track cf IOP memory as it is allocated.
!2I£
l!~!!!
~Qtl:t2Jl!
o
1
PWBP
FWABP
2
LWASP
3
PiA M
4
LilAH
holds address of
holds address of
bas ~ I=a ge
holds add.ress of
bas·3 I=agE
holds address of
program memory
holds address of
program memory
ASCII
1st word of base page links
1st vord of available
last word of available
1st word of available
last word of available
This table· controls the system configuration dialogue for
files.
It also prcvid9s basic
parameters
for
the
7-7
'of the .MASP entries which are generated fro. the
ASCII files dialogue. Each eight word entry in .ACt. is as
follows:
~stablishm~nt
!.2Ia
,
o
2
3
4
5
6
7
8
~2ALen~§
Device type name (2 ASCII characters)
Basic devicE designator
Klnimum numbet of this device allowed
ftaxiaua numter of this device allowed
Default reccrd size in words or a negative value
Maximum reccrd size or address of aevice subtype
table if word 4 is negative (see note below)
Device characteristics and flags:
Bit 1S = , if input device
Bit 14 • 1 if output dev~ce
Bit 12 s 1 if cnly output allo~ed is CTt.
Bit 7 = , if BtlE pseudo device (causes this
entry to be bypassed in no RJE. llso prevents
request' for select code.)
Bit 6 = '1 if Sf device
Bits 5-0 contain select code for SP devices and
Dumber of associated select dodes if lOP device.
Address of 'list of addresses of vords to receiYe
n umber of these devices to be c!,n~gured (list
is terainated by ainus ODe value)
Address of vord to receive address of' first .ft1SP
entry corresponding to this type of device
Note: for devices which co •• in several flavors, vord
a subtype table. This is indicated ·by a negative vord
case, word q represents the aaxi.ua subtype expressed
All subtypes are zero re1ati vee 1 subtype table is as
l!.2Ig
o
1
2
5 addresses
4. In this
negatively.
fellows:
'ml.ti.D1!
Default (and maxi_us) record size for subtype 0
Sase for suttype 1
Etc.
Nev
types of ASCII filas can be included by si.ply adding nev
to this table. 1 nega.tiye one word terminates the table.
Tha ord9r of the table aust be as follows: all system processor
devices, all RJE pseudo devices, all lOP devices.
~ntries
This
tatle
contains all inf ormation required to .ake
load/Doload decisions about modules encountered. in the binary
7-8
input files.
In addition, oth-:!r information is present to be used
in configuring various tables (EQTs, etc.). The order of .HAST
.antries for drivers and handlers indicates relative -IOC and TSB
logical unit numbers which lIust be deri ved- froll this order and
cth6r inforlla tion such as that in .MeT. Entries in .ll&ST for
standard file modules Must centain a copy coun t of 1. Other copy
counts are establ-ished during the initial dialogue. The forllat of
.HAST is as follows: .
~.2!lant§
r10d ule namo!
Module characteristics:Bit 0 = 1 if module is handler
Bit 1 :: 1 if Dlcdule is dri ver
Bit 2 = 1 if module is varying RJE module_
Bit 3 = 1 if module is RJE module
Bit 4 = 1 if module is ASCI~ file .odul,
Por handlers:
Bit 15 = 1 if module has prime entry point
Bit 14 = 1 if module has I/O complete entry point
Bit 13 = 1 if .odul~~as initialization entry point
Bit 12 :: 1 if .oduls r:a pre $l3n ts allocatable resource
For dri ver 3 :
Bits 15-14 are EQT characteristics
Humber of ccpies to load
D esigna tor ta me (if handler)
Dri ver numb4r in bits 7: 0 and nU'mber
of assoc~atEd select codes in bits 15:8
(if driver)
4
5
DBL exit address
6
7
8
9
10
ENT exit address
END exit address
!odule index number (for use as index to special
processing toutines)
For handlers, this word contains the logical unit
number associated vith same. If multiple COpi9S
of the .od~le are loaded, this will be the first
of the assigned unit numbers. For drivers, the
basic select code of the module is contained
here. For drivers whioh are loaded .ultipl~
times for use as ASCII files, this word contains
the address of the first .MASP entry which
corresponds.
For several basic lIodules, this
wor-d initially contains the Dumber of associated
select cod;)s.
Iha order of entries in .NAKT is as follows: all drivers, all
- handlers, all ether modules. The drivers and handlers sections
.#
7-9
ar~
in relative logical unit number order both for IOC and TSB
logical unit nUMbers. A negative one value delimits,. the table.
f:!.!!~2 ltas e fA~
One
memory page of IO~C is reseved for use as a pseudo base
this page is contructed the base page whicb is
loaded into the Iep. 50ae locations are asseabled into
this page which are assuaed by the lOP program. These are:
~age. ' On
=v~ntually
Content
cw
6
7
JiP~:I for system start
HLT 5 fer memory failure
CLC 6 for DMA channel 6
eLC 7 for DKl channel 7
Location 3 is later filled ty lope with the last (hopefully only)
transfer address encountered in the processed' binatys. Location 4
is
configured
by the 0.04 mQdule .odification a~pendages.
Locations 10 through 77 ar~ initially zero to indicate that none
of the select codes hav~ ,e't been allocated. They are set nonzeto as they are allocated during the system dialogue processing.
j!2gU! .!1lR lAll! , •
r!"
T .&.l.
Each 5 word· entry in this table saves the name and beginning
and ending addressEs of each mcdule loaded into the IOP:
H.2l:~jn
0-2
3
"
£on te .n1
e.odulE name
~odulE starting address
e.odule ending address
the table is terminated by a word containing a -1 value.
Each 5 word ~ntry in this list contains the name of an lOP
program entry point plus its entry point address and base paga
link· address.
This list is kept in a reverse order froa hiq:tl
memory down var d:
~2IlljU!t.§
1 st wcrd of naae
2nd werd of name
7-10
Jrd verd of name
address of entry point
address of base page link
2
1
o
In addition, 'a count of all such entries is kept in variable LST~
The LSTP routine described bElow, will establish five indirect
pointers to' a given entry with LST1 addressing vord 4, LST2
addressing word 3, etc. '
~J!~li2J1U f! e~ .£i!i cC\ t i qn'.§
~!ls12.!l
1 -
~.§S.!l! ~.2!l!ig.\!.£A112.n. Q.~ls.gS!
Before
discussing the actual dialogue process, several
subroutines will be 6utlin~d. All are used by section 1.
The
READ routine is used as a central console read subroutine. In
addi tion to requesting a console read via the MCP console driver',
a line feed is output to acknowledge the input. Also, the first
input character is tested fQI centrol-G tBELL). The occurrance of
this code is the operatorfs abort signal. READ then issues an
abort message and terminates lope. No~mally, however, BEAD simply
returns to the caller.
The LD8YT subroutin~ extracts character. from the console
input buffer and inserts thea into the A r~gister. The high order
8 bits of A are not disturbed. LDBYT advances ~he tuffer pointer
as charact~rs are extracted. If a carriage retarn is detec~ed, a
space character is returned and a "+0" return is made.
Normally,
return is to "+1".
A YESNO subroutine processes res~ons~s intended to be yes or
The caller provides th~ address of the question which YESNO
~utputs.
Next, the response is read and the first character is
input. A NO response ("N" or null input) causes a "+0" return.
A
yes response . (ttyft) . causas a "+1" return. Any othel: response
causes the question to be as~ed again.
no.
seREA
is a selEct cod-a input and analysis subroutine. Input
is a value in A which represEnts tha number of total salect codes
associated with the basic select coda to be input. The E register
inputs the address of a message part which describes the desired
select c01e. seREA first outputs the s91ect,code question. Then
th~ OCTIN routine (see
b~low)
analyzes the input.
Any error
results in an appropriate diagnostic and reasking of the question.
Correct octal input is validated as a legal select code.
If
7-11
valid,
the 'given code plus all associated codes are checked for
specification.
This prevents
overlap.
As
SeRJ!:A
allocates
the
select codes, it marks their allocation, in
corresponding locati~ns on pseudo base page.
Before returning,
the select code is checked against, • l!SCl! (aaxilJua select code]"
and .!SCl! is UFdatEd if necessary.
pr~vious
DECIH and OCTIN process numeric input and return an internal
binary value plus an indication of the terminator of the nuaer:Lc
string.
Both use a ccmmen routine but set up a different
conversion radix.
"i51.2~Ul! .2I~!.§ill.SJ
IOPCM is the entry point which receives contr.ol fro. ftCP (v=La
the IOPC entry point)~ lope is identified to the operator, and
the optional reload question is asked. A yes ansver leads to the
re load routine desct'ibed in appendix B.
Nor.ally, a series c)f
configuration questions is asked.
Processing of these is as
follows. Note that.in aany cases, the outcoae of the processing
is to set • "CT. values.
other important details include the
setting of copy counts and na.es in the aodule loading table.
these settings vill determine the eventual module selection.
DATE?
Any input, except null input, is accepted and aoved to the header
message which is part of the ouput of section 3 processing.
r1ErtORY SIZE?
Decimal input is accepted and compared to a list of valid
specifications. The correspcnding actual high memory add~ess 1s
established in ."EMS.
NUf'2BER
tha
or
PORTS?
decimal nu.ber of ports is input and validated.
De~eDdiDq on
th9 specificaticn, the requited version of the aultiplezer
driver'
is selected (1 or B). This is done by setting the aI=propria'te
name ·in the module loading table. Also, the associated nuaber lof
select codes is set at either 3 or 6.
BUFFER SIZE OPTION?
A no answer to this' question results in no further processing, a'Dd
the .PI.CT. default TTY buffer sizes are used. l yes answer allows
input of alternate siz9s. Any of the three formats of buffer size
7-12
specification are input and analyzed repetitively until an 'END'
is input.
Each specification is validated, and a range of ports
is found (may be one port). The given size is then set in the
corresponding slcts of the .MCT. tabl~ts .MPBS entries.
IXX SELECT CODE?
SCREA' is used to input" each of the select codes for the time base
generator, interconnect kit arid ·multiplexer. The module loading
table for the asscciated drivers initially contains the number of
associated select codes (at cffset .NAUN). This value is input to
SCR!A and is then cverlaid by the select coda returned from SCREA.
2741 TYPE
TERMIN~LS?
A yes answer causes ~he ClPY count to ba set to one in the modula
loading table entry for th~ 2741 module. At least one 2741 code
must then be selected ~lso. These questions are asked and the
code module copy counts ar~ also set as required.
INCLUDE RJE PUNCTICN?
A no response causes this section to be skipped. A yes response
leades to two other questions asking which version of RJE is to bg
included.
Next a scan of the modul~ loading table occurs. All
'RJE related modules receive a copy count of one.
In addition,
those which are variant
CISM
CDC) have the module names
modified to raflect the apprcptiateOrequirad version • . then the
seREA routine is invoked to cbtain the syrichronous modem interface
~elect code.
For the IBM v~rsion only, the number of each type of
host function is input.
these values ar~ stored in resp~ctive
.~CT. cells (.l!HBD, .MHLD, and
.MHPD)
and in respectivE .ACT."
cells for specification of the "maximum number of JT, JL and JP
ASCII file types. Finally, the copy counts for HR, HI, and HP
modules are set sinca thasE may be loaded in multiple. Next ths
ASCII files question is skip~ed since RJE requires ASCII files.
vs.
NON-SHAREABLE DEVICES?
For
th9 y~s answer to this qu~stion, all processing is controlled
by the .ACT. table.
Por eac1: .ACT. entry, th.9 follollinq is . done:
,.
If no RJE compo~ent is to ba included and the fil~ type
is RJE related, then the .ACT. 9ntry is skipped •
. 2.
If only one possible quantity of the file type can be
specified, then the quantity question is skipped.
Otherwise it is asked.
7-13
3.
·
The· specified numbe~ is checked against maxi,mum and
minimum.
If acceptable, the mod1l1e loading table
entries which a~e related receive appropriate copy
counts. The total Dumber of ASCII files is updated .
(. l!APH) •
4.
For each
done:
a.
b.
c..
d.
e.
file .of the type r9quested, the fcllcvinq is
A .KASP ~ntry is started with the correct device
des igna tor.
Device chatacteristics from the .ACT. entry are
moved to the .!ASP entry.
(This includEs select
code for SP devices.)
Por real lOP devices, the select code is input
and added to the .aASP entry.
If a subty~e is indicated by the .ACT. entry, ;it
is obtained and merged into the .ftASP entry.
Finally, the' record size is input and added '1:.0
the entry.
At the end of this. processing, ccmmon ASCII file modules are set
with appropriate copy COUDts (unless ·only SP
devices
are
requested) •
An important fact about the above processing is thilt
it results in the generation of .BASF entries in an crdet opposite
that required for the IOP device table (.DVTS). This vas only
done as a matter of convenience bere.However, it forces tack to
fron~ processing of the tablE during later sections.
XX DEFAULT DEVICE ASSIGNftENT?
This question is processed only if RJE is included. First,
validity checks of the nuaber of ASCII files to the number of host
functions is done. This is tc insure tha t not more .host functions
3xist than devices "to be potentially associated ~ith the_.
Next,
thg question is aSke'd fot each defined host functio!). Tile
response is validated as a legal file type for association vi1~h
th~
type of host function. If valid, a designator is contructed
and stored in the a~propriate .!HRO, ."HLD., or .!~PO entry.
These are later used to construct the lOP .OAT table.
MAGNEtIC TAPE COPY?
The correct lOP copy option is set in .KOPT.
S~veral
.final activities ate new
7-14
perfo~med
by section 1.
The select coj~ for D.61 is copied to associated
driv9rs D.62 and D.63.
For all unspecified select codes from 10 u~ to the
maximum lOP sdlect code, a
HLT
instruction
is
configured 'into the corr~sponding pseudo base page
select code loc'at ion.
The· total number of. modules to be loaded is calculated
and saved.
.
Logical unit; numbers are calculated and inserted into
module loadir.q tatle entries. This is done c~ly for
function handlers which are to be loaded and which have
I/O complete. entry points.
The first available base page location (.eSC!+1) is
set.
The standard modules file is select~d via the MCP.
The starting of the lOP loader is requested.
The IOP is loaddd with zeros.
Section 2 is entaIed.
1.
2.
3.
4.
5.
.
.
6.
7.
8•
9.
.
~~.2..Y~.iU§,
Several subroutines weich are a major part of section 2
processing are d~scribed first. NOt9 that some of these routines
(e. 9. DIAG)ar E USEd by sect i<:ns 1 and 3.
LINK is a routine used to allocate base page indirection
pointers (link words). ThesE link words are required for tha
r~solution of eff-page references of locations by memory reference
instructions and DEFs not on the same page. LINK accepts input in
reqistar A.
If A is zero, then a new bas~ page link is forced to
be allocated. ! f A is non-zero, a scan of existing links is made
to see if one already exists. In any case, register B is used to
return ~he address of the required base page link. LINK aaintains
its base page image on the fseudo base page but returned register
B values are actual base pagE addresses. An overflow of base page
re sul ts in an tlbort.
LSTI and LSTP are rcutines used to access the ~ntry point
list. LSTI prepares LSTP for a scan of the list by s~tting a
controlling count and an initial sat of pointers. FivE pointers
are used to allow indirect
referenc~s
to' a given list entry.
Thase pointers are adjusted by LSTP. LSTP returns "+0" when the
list is exhausted.
Normal return is at "+1".
7-15
S~veral
terminal error
~ypes.
All have entry points
appropriate message~ and the~
exits are defined for com.on error
of the form LERx.
All produce an
abort. ftost add special inforaation
'to thE message to, te' output.
DIAG is a general console output routine. An inline DEP to
tha messag~ is the only required input. If the DEl is indirect,
this implies that lOPC is to be terminated and is not really an
indirect DEl.
In this case, DlAG returns to the !CP after
~rop6rly
repositioning th~ .aster tape. "essaqes are preceded by
a positive count of the number of vords in the message.
PACK, PUNCH, PPPP, and CKSS are routines used to prepare
load records for transmission to the lOP protected loader
(sae IOPLD).
PACK adds a verd to the absolute record and updates
th-= checksum • . PUNCH completes the checksum using CKSS and then
calls IOPLD to load thg record. PPPP is then caLled to reset
pointers for new PACK calls.
~bsolute
IOPLD accepts input in register B indicating that a'record is
be loaded into the IOP (B=O) or that the IOP protected loader
is to be forced to stop (B=-1).' A 'timout technique is used to
insure that the lOP loader is running.
Failure to receive a
response from the lOP prior tc the ti.aout will result in an lope
abort (unless 8=-1 input raqoested this action). Normally, each e
hit byte of A' is output to the rop via the interconnect kit (blts
15:8 first).
~o
~~£!ign
l
2~~li~~
section 2 processing is essentia.lly that of a relocati,ng
leader'like the one used in les or MTS syste.s.
However, there
ar·? additional functions. The overall fl01l of section 2 is:
1.
2.
3.
4.
Load modules from the standard m~dules file.
position to the optional modules file. select aDd load
required optional .odules (there are always soae).
Construct 1012 systell tables, control blocks, etc.
(. DAT, • DV T B, • Ca Po., QIT' s , et. al.)
Create a magnetic tape copy of the' lOP program .1£
required.
'
important extensions to th9 normal type of processing
performed by a relocating loader are a standard part of steps 1
and 2 above:
Sev~ral
1.
The modul~ loading table is used to select .odules to
be loade~. Unneeded modules are discarded.
7-16
2.
3.
4.
~odules
which are to be replicated are copied to an
Iope in-core buffEr and repetitively processEd froll
th'at area. This is to prevent the need for ma·ster" tape
rereading and to allow singular application of patches
by the "CPa "
Select cod"as and IOC logical unit numbers are aerqed
into the relocated modules.
"
optionally,Dlodcle modification appendages can b.e
invoked to perform sp~cial p~ocessing of the relocated
image
of
a mcdule being loaded.
Also, special
processing at the end of module loading can be done.
These appendages are indicated in the modula loading
table entries. Three are defined as follows:
!xl! -For aach module entry point (except .SCxx or
.LUxx), an exit is made. Registers are set as follows:
~!I
= address of
record
A
ENT
entry as it appears in the
ENT
B = base address of the module being loaded
The exit routine is
exp~cted
to return as follows: "
+0 - normal return, retain the entry pcint
+1 - optional
r&tu~n,
discard
th~
entry pcint
ill!
Following the relocation of each modulg
location, the exit is made.
This is dona prior to
loading the location into the IOP. ReqisteIs are set
as tollows:
n~~
A =
relocatEd value of location
B = location address
return, B is cf no consaquence. However, A is used
as rgturned. Thus, the exi~ may modify the value to ba
loadfd. Th~re arc no optional returns.
On
END ~xj1 - Aft~r relocation and loading of the modul~,
this exit is taken. No regist~r values are provided to
the exit, and no optional r~turns may b~ made. Th~
exit has access tc FiAM and an indication of the 'next
available locat.icn and may use tho ENT exit to define
needed addresses within the loaded module. FiA~ can be
modified up or down by this exit as required •. '.
7-17
B~lg£~ling l2A~I
Processing of both the standard and optional aodule files is
sequential. Routine LDBIN reads through the current file and
performs minor validity checks on each record read. Each record
is a singl-e relocatable bina Iy record a.s produced by an asseable:r:.
NA!, ENT, EXT, DSL, and END records are accepted. Further, it is
assumed tha tall E NT and EXT records precede any OBL Iecord;s.
(Note that LORIN can ,be forced to rea.d frcm an in-cora copy buffer
for modules vhich are repetitively loaded).
LDRIN invokes the NA! record processor in all cases. This is
to allow for the selection decision. other record type processol~s
ara also invoked unless the HAM selection process dictates thnt
the module is to be skipped. 'Ihe PLFLG variable (progra. loading
flag) is controlled by the HAM processor.
LDRIN includes E~D record processing. At END process~ng. any
transf9r address is set as the lOP program start address on pseudo
base page.
Note that only one such transfer address is assuaecl.
N~xt, the entry point list is scanhed, ~nd the sixth byte
of all
names is set to zero.
Criginally this is an external ordinnl
which is used in each binary module to associate the' "nth" ElCT
definition w~th any given external reference in a memory ref9rence
instruction or DEP. Next, t be end appendage for the .odule ls
invoked.
Folloving this, the module map tab19 is updated for the
~nd address of
the· module.
The total module count is th~D
adjusted.
If more modules are to be loaded, LDRIN continues.
Otherwise, con trol is passe a to section 2 table constructic)n
processing.
LORIN vill ~osition to the optional modules file for further
module selection at the end cf the standard' modules file •
.HAll
~~~~§.§.i.ng
main purpose of NAM process inq is to lIIake a lcad/nofoa.d
about the current mcdule. Note that all module selection
is ,based on HAM ~ecords.
other actions include recording the
module in the modulellap tab le ~ defining the module 'relocatic'n
base, and copying the module to an in-core buffer if a repetiti1'e
load.
The
~eci~ion
NAltR first tests for an in-progress repetitive lead. If a
previously select~d module is. to .be loaded more than cnce, the
copy count is reduced.
ihen it reaches zero, the binary is
finally discarded.
otherwise, the un~t nusber if
~nJ
is
7-18
e~tablished
(see below).
!hen the in-core copy is medified to
give it the appearance of a new module:
1.
2.
·The third or fifth character of the module name is
incremented (third if a han~lar and fifth if a driver).
For example,. eRa tecomes CR1 and 0.110 becomes 0.111.
All
ENT entries having nam~s of the form XXdII
(handlers) or XXXXd (drivers), whar~ "d" is a digit,
haVE the d incremented. prcc~ssing continues at l~bel
NM 3.
For new occurrances cf modules, the module medification
appendages are set to a dummy exit. Then the module loading tabla
is scanned for the nam9 in question.
If not found but the
standard modules file is curIent, the module is force loaded.
This will allow the inclusion of sp9c~al routines such· as line
printer core dumps. If no.t: fc:und .:1nl1 the optiol)al modules file is
current, the module is skipped. If the module is located, the
following is dcne:
If the copy coun~ is zero, tha module is skip~ed.
If only one copy is need~d, the module unit number is
set as are its a~pendages.
~rocessing
continues at
1.
2.
liM3.
If multiple copies are required, the modula·is copied
to an in-core buffer. Then the module unit number and
appendages are set.
3.
At the NM3 label, module leading is set. The module name is
copied to the module map table. Pcint~rs to the table entry for
recording module size are set. the program relocation base is set
and possibl~ memory overflow is checked.
Contrel returns to
LDR IN.
Two routines in the HAM procassor are
usad to establish the existerce cf any select
number which might be associated with the
This is used by the OBL proc~ssor for
instructions and paramet.ers.
of concern. NftBUN is
code or logical unit
module to be loaded.
merging
into
I/O
CORED' is used to pecfcrm in-core re~ds in place of calls to
the magnatic tape driv~r. This is don~ for r~plicated mcdules.
:3liI .e~$2~~~i.ng
All
ENT names are fir.:3t testF.-d £0::- the forms. Scxx or .LUxx.
points define locations in a module to which the
Th~se ~ntry
7-19
moJule's unit Dumber (select code or IOC logical unit number) .us~
be added. The occurance of such an ENT is discarded frca further
proc~ssing
after calculatitg the address of the location in
quastion. These addresses a~e counted and added to a special list
used by the DBL processor.
Normal ENT p~ocessing is as follows. The ENT e%it is taken,
on return, the entry point may be discarded.
If kept, the
pr=vious occurrance of the name in the entry point list is
checked. If not found, the entry poin~ is added to the list.
No
base page link is generated at this time since no extern,al
references to it are yet indicated. Thus, the entry point list
entry word 5 is set to zero.
~nj
If the name is found aId the entry point address (vord 4) is
nen-zero, then the entry point cccurred previously.
This is a
duplicate erroneous entry ~oint and IOPC is aborted. otherwise,
some previous refere,nce to the entry point has occurred. In this
caS9, word q in the entry ~oint list is completed vith the entry
point address. The ass~ciatEd base page link also receives the
~ntry pcint address.
The EXT name is first locked up in the entry point list. If
not presen1:, it is added to the list. The proper external ordina,l
is set.
Also, a base page link is defined. This link vill be
us~~ to resolve references tc
the external name with indirect
references via base page.
An external ordinal is a non-zero value assigned to each
external symbol defined by an EIT statement. This definition is
done by an assembler.
the assembler then uses this value when
assembling memory reference instructions and DEls which reference
the ~xternal.
That is, aseellbled with the instruction or DEP :ls
an indicati~n that. the ref~rence is external plus the associated
external ordinal.
If the EJT name already exists in the entry point list, only
the external ordinal is changed in the entry.
~l!1£ R..~~!!in..g
Words to be relocated cccur in 5-word groups in OBI records.
rhese groups are preceded by a vord containing 53-bit indicators.
Each defines the type of telocation to be perfor.ed on the
rgspective subsequent 5 values:
7-20
l11gi£al~
o
1
2
3
4
5
lIR~
2!
£~lggali2~
Absol ute val ue
Progr~m relocatable
Base page relocatable (unsupp.orted)
Common relocatabl e (un'supported)
External ref9rence
Memory reference instruction:
Ihis is a two word entry.
Word 1 contains the op code
~lus an indicator of the type
of reference --
'0 -
program relocatable
1 - bast09 page relocatable (unsupported)
2 - common relocatable (unsupported)
Wcrd 2 contains the 15 bit address.
of the referenced location.
th3 OBL processor loops cn th~sa 5-word groups and ~erforms
relocation as noted below. ihen the relocated value is ready, a
scan of the unit. merging table is done to see if the word requires
addition of a select code or logical unit number.
Next the DBL
~xit
is taken.
Pinally" the .PACK routine is called to add the
value to the absolute record.
PUNCH is called whenever the
absolute record is filled.
For type 0 and type 1 relocation, the value in the ISI record
simply added to zero or
t.he
module
relocation
base
respectively.
is
For external ref~rences, the entry point list ·is scanned for
corresponding external ordinal. When found, the base page
link address is merged into the word and the indir~ct referenc9
bi t is set.
th~
For
memory referenca instructions, th~ address of the
referenced location is gen~rated. An on-page refer~nces causes
merging of th-a page offs'3t bits into tha instruction. For off.page refer&nces, a base page link is generated. It receives th9
~ddress 'of
the refer~nc~~ location and an indirect bit if the
instruction is an indirect referenc~.
Th. instruction in this
case is made to indirectly reference th9 allocat.ed basa page link.
A.E.E!ll,gs.9's§
Sp~cific
module modification appendages are outlined
7-21
b9lc~.
0.61
Th~
ENT exit is used to locate vords which the DSL exit
will set (RJE indicator, DMA linkage vords, and memory si%8). The
END exit is used to return storage frnm unused LUT tables.
0.63
The END
control tables.
C.51 -
Th~
exit
is used to construct the ASCII file unit
END exit is used ,to release unused TTY tablas.
All r~plicated handler aodules- The ENT exit locates a vord which
tha DBL exit fills with the relativ~ copy number of tbe loaded
module.
Th~
pover fail interrupt linkpage is set on pseudo bi!lSe
page. The END exit then constructs the pover recovery appendi!lge
list and count.
It is assumed that 0.04 is loaded after il11
dri verse
0.04
MUXH - The END exit deletes unused tables.
IeKH
- Unused unit tables are deleted.
allocated, constructed and leadEd.
,ASPH
'The
Then the TTY tuffers elre
exit locates the file characteristics list.
copy of these.
The
END exit overlays
list with constructed file tables
lNT
CBL exi t sa ves a
ch~rac~eristics
'fhe
~~he
IOC - Tha DMAC2 variable is set to permanently allocate channel 7
to 0.61.
Int~rconnect
kit logical unit number
parameter lists in the ailocate aanager.
MN
IAR1!
is
merged to IOC
ssn!S£~1i2n
"any lOP tables and contrel blocks are built as follows:
.a.~.QJl.s.'
.2l1!, W
l2.l2I
A pass is .ade on the handler entries of the module loading
table. Durinq this pass, thE ccmmutator is co'nstructed and loa,Cled
directly into the lOP. ~Tha IODt and OIT's are built in SP storage
for later loading into the Iep.
'
The .COR. entry point is defined. An indirect JSB to IOC is
built for use in building ~he .CO!!. CBa calls. An indirect ,J!tP
to the C"PLT routin~ is built, also for use in building eRQ calls.
7-22
Th~
seven entries of IOOT which
units 0 through 6 are built.
handl~
arron~ous
references
For
each
handler
entry in the module
corresponding to a loaded module this is done:·
1.
2.
3.
4.
5.
6.
table
The first 3 characters of the module name are saved for
use in constructing handl3r gnt:y pbint names.
If the handler has a prime en'try, a ccmmutator gate and
JSB to the entry point ar~ contructed.
the gate
address is saved for use in building the QIT.
If the handler
has an I/O complete entry ~oint, the
IOD! co~y is updated.
A QIT is construct~d.
steps 2 through 4 are repeatad for replicated modules.
A .COM. CRQ call is built if the handler ccntains an
I/O complete entry ~cint.
Finally a catch-all
'final JMP to • COM.
Th~
loading
to
eRa
call is
add~d
to the' .COM. as veIl as a
lOOT is ccmpleted ard'is transferre1 to the IOP.
N~xt,
tha QIT's are ttanferred to the IOP.
DEFs are also contructed as fellows:
QITAD
QITND
QITNR
QITMX
QITAF
Sev~ral
DEF
first QIT
QI!NO (follows QITs)
DEl
ASS
DEF
first allocatable QIT
max TS8 unit numb~r
ASCII files handl~r QIT
DEpt
special
o
Addresses of each of tte three SPRTs is saved as each is set
to zeros and loadEd into the lOP.
Buff~r
subpools 1 and 2 are construct~d. AddreSS9S of the
first and last buffers in aach pool are saved for inclusjcn in the
SCOLs.
Tha numbEr of conttcl buffars constructsd is either fiv9
or 1/2 the number of TSB Forts, whichever is greater~
Pive
console buffers are always htilt •
. Ea:ch SCOL is
BPR!s and subpools.
built using addr4?sses saved from building the
Finally, . the
buffer
manager's PULPT list is overlayed with
the three SCOL addresses.
.t..I2!l~
The ~DVTB entry point is defined and loaded with a DEF *+,.
The negative number of ports is loaded followed by the negative
number of ASCII files. Finally, the .MASP entries are processed
in reverse order tc yield aach 5-vord .DVTB entry.
,DAT
The uDAT en~ry point iE defined and loaded with a DEP *+1.
then the ."HRD, .!HLD, and .!HPD lists are used to construct the
.DAT entriGs. Tvo -1 valuas are added to terminate the .DAT •
. A scan of the driver entries in the aodule loading table is
done. Por each loaded drivet, the following is done:
.
1.
2.
3.
4.
5.
rhe
driver nuabet is converted to ASCII character fora
for use in na me lcokup.
The nu.ber of related select codes is sayed as are the
driver characteristics (used to build EQT vord one).
The related select code is derived and saved.
The
number of ECTs is inereaented.
ThE EOT is
constructed in SP stcrage using saved information.
Por each related select code, an interrupt vEctor value
is Established. It is assumed that I.II is the first
interrupt entry point and that J.XX, K.~I, etc. are
related to susequent select codes. If a given entry
point is not defineQ, a halt is installed in the
interrupt, vector.
Note· that the related undefined
entry point is skipped. These vectors are built on the
pseudo base page as at;'e the related interrupt linkages.
!h9 XEQT entry point in IOC is nov overlaid with the 1st address
for the EQTs. This address is alse saved for section 3 report
generation use. Fin.lly the lQTs are loaded into the lOP.
7-24
The memory table is overlaid with a copy of the memory
allocation table and addres$ cf the cold dump analyzer list.
~lg Q.~ l.na!Ia~ ~1
A . list of addresses and other parameters is generated and
loaded int~ the rop.
Th~
address of this list is moved to
location 3 of the IOP by the IOP software at system start.
Undefined addresses result it zero valu~s. The content of this
list is:
!2~g
£~ten!~
DEF .DAT
.DiTS
QITAD
PULPT
0
1
DEF
DEP
DEP
DEF
DEF
DEF
DEF
DEP
DEF
DEF
DEl
DEP
2
3
"5
6
7
8
9
10
11
UCTOO
SIBlK
SIBAF
D.61S
TTPTR
eRQ
DEP QHEAD
DEF STST
12
13
14
(address
(addr€-ss
of
of
of
of
of
of
of
of
of
of
of
of
of
of
of
QITs)
SCOL list)
0.43 TOE chain bead)
D. 51 unit tabl as)
D.61 unit tables)
0.63 unit tables)
ICKH uni t tabl es)
ASFH unit tables)
0.61 trace pointer)
MN trace pointer)
• IOC. eRO head)
.. IOC. free storage)
SYNxx tables)
MEMFY free list)
EOT tables)
(addrf.-ss
(addrEss
DEF EQTs
Copy of • riO PT
A ddress of 1st buff9r in pool 1
Address of last buffer in pool 1
Address of 1st buff~r in pool 2
Address of last buffer in pool 2
15
OEF PNTR
16
17
18
19
20
21
~'§!l
QTOP
LtlT 51
LUT61
(address
(a.ddress
(address
(addre ss
(addrsss
(·address
(address
(address
(address
(address
(addrl?ss
.Es.9!! !.9.a~1:11g
After
aLl table construction, the pseudo base pagE is loaded
into actual IOP base page.
If any
required modul~s were not
loaded, a warning message is issued.
Ia~ ~.QR.I
.
If no tape copy is request~d, section 3 is entered. Por a aaster
tape copy, the presence of a write. ring is insured.
Then the
master tape is positioned to the last file of the tape which has
file ID 65000. This is the eptional copy file.
For a separate tape, the .aster tape is unloaded. The
oparator is asked to mount the separate tape. When this is done,
th~
presence of a write ricg is insured. Next, a loader program
is written to the tape followed by a file mark. (See A1?pendix A
fo= a descriptien of the leader program).
The operator is asked to start t"he lOP at location 2002.
This causes a J!P to an unloeder program which is'part of the lOP
D.61 driver.
The unloadet transfers all of the lOP core i.age
back to the SP. This data is foraetted back into absolute records
and written to the t~pa.
Finally, the' report generator is
entered.
aect!~_1
-
~,~ Gene£lto~
The report
produced ty Iope is described belove Pirst a
summary of the sources of the data for this report is given.
ILQ
.!i!l - the pseudo base
page select code vectors are
For each ene, a line of "output is. produced
(potentially 3 for the interconnect ·kit, a special case). The
linkage is shown, and if the select code can be related to an EQT,
the EQT information is added."
11ll.5!g~
scann~d in order.
R~~
l!n!§, m~!2~ tOUDS!
the memory allocation table
provides the data for this otit~ut. Also, an estimate of ne~ded
fr~e storage is made, and a ~arning is issued if:
~a~~
Available storage S100+100*R+(HR+HL+HP) +100*A
where R=O if no RJE
1 if BJE
Hx=repective host functions
A=~umber of ascii files
It
must be pointed out th"t this estillat.e is ! i l l
~
rough.
I~
~ttempts t~ reflect the need for RJE buffers by
one-halt cf all
host
func~.ion s
ccncurrent 1 y and all ASCII files concurrently.
However, the formula assumes a 400
which may b~ incorr~ct fer some
incorrect for CDC host systaas.
7-26
byte communications buffer
IBM systems and is certainly
!~£!l !il§~
A2!!
- a summary of the .MASF
~Y~iQ~ ~~i~n~~!~
sumaarized
!2gyl~ !~2
-
entri~s
is
produc~d
the .MHRD, .MHLO, and .KHPO tables are
- The contents of the module map table is listed
~1..I
§l!!U,£.I
The in-core c'opyof the QITs previously built is
used to calculate CIT addr~ssEs and designators.
,g1l1'&:I ·.E.21ni
prin ted •
The' entry
l1:11
poi nt
list.
is sorted and then
.B~.e21~ QYll1~
The report produced I:y lOPe. supposedly contains sufficient
information to assist the ~nalyst in resolving program problems.
It also gives certain information of value to the user. This
would be information about tte siz~ of a given configuration as
well as available and/or unused memoty space. Such inforaation
can be valuable in making decisions about system performance as
veIl as upgrades which may te ccn5idere~. The report is outlined
bela w.
.
I/O PROCESSOR MEMORY MAP
DATE=8/6/75
This line of the report is the first lin~ output. It identifies
the map and also identifies the particular configuration with the
information supplied by th~ oFerator to ~he DATE? question of tb9
ini~ial
dialogue sequenca.
It is not nacessary that
that
information be restricted tc a date.
In fact, some other
id~n~ification of the systam type might be advisable.
s. C.
I/O LINKAGE
CR IVER
I. L.
ABC
I. E.
U.
D
g
~.
EO'!
F
Th~
I/O linkage list gives a ccmple~e summary of the relationship
of select codes to int~rrupt er.try points, • IOC. logical unit
numb~rs,
and equipment ~ables (EQTs). Each line of the report
corresponds to a given sel~ct code, and th~ select codas are all
t~ported
from 10 through the maximum salact codg used (.MSCK).
Not all of the A, a, c, etc. values will appear in each line.
This is true in thosp. si~uations wh~r~ multipla select cedes argo
associated with a given EQT. !he cont~nts of each line are as
follows:
A
Sel ect co de
7-27
B
C
D
E.
F
Nam~
of driver (sase as driver's initiator section
antry point nama).
This field of the report any
con tain blanks if the select code is one cf sever2Ll
associated with a giveD driver.
Th~
field may also
contain the word "HLT" if there is no interruFt entry
point associated 'ith the select code. In this case,
the actual locaticn vill contain a HLT instruction with
a halt value corres1=cnding to the 'select ,code.
Base page address which is object ~f indirect JSB
located in select cede vector.
The 'content of, this
base page location is the address of the associated
interrupt
entry
point.
These
locaticns
are
collectively referred to as interrupt linkages.
Interrupt entry point (same as entry point name of
driver's continuatcr section).
• IOC. logical unit nUllber.
Address of EQT 'associated witb this select COdE. This
value and the E value vill appear only for the first
select code (baSE select code) associated vith a giVEtD
EQT. Note that fer multiple select code devices, the
lOP program currently assumes that the select codes are
contiguous.
select code associated with the interconnect kit is a special
any may result in one, tvo, or three lines in this report.
This is becaus~ in additicn to the basic D.61 driver, tvo other
driv~rs may also be loaded i~tc the system (D.62 and D.63).
Th~
cas~
EASE
PAGE LINKS -
X··y
are reported the first and last base page addreSSES used as
indirect linkages. All othel: base page locations fro. Y+1 to 171'7
are available.
Her~
AVAILABLE MEMORY - X-Y
Unused memory from locaticn X to lccation Y is reported.
~hat this area of memory and'any unused base
page are the
ar~as available for dynamic tuffer allocatio,n.
AsetI PILES
L.U. DESIGNATOR SELECT CODE
ABC
Note
free
SECORD SIZE
D
This report appears only if at least one ASC!! file is defined
into the system. Each line cf the rSFort describes one ASCII file
as follows:
7-28
A
Logical unit number cf the ASCII file as used by BASIC
programs.
ASCII
file device designator and possible device
subtype indicator.
Subtypes appear only for those
devices which ccme ,in several flavors such as line
printers and card
readers.
i
The salect coda of the, device is given if a~plicable.
No select codes ale associated with RJE pseudo devices.
Note that-the select code for MT and PH devices are SP
select codes.
Default- record size in words which will be allocated
for use with th~ device. This value may be over-ridden
by the BASIC progcalmer.
B
c
D
HOST
FUNCTION
DEPA OtT
DEVICE
A
B
This report is not produced if no' RJE
system. The report. shows .. he default
host functions which will bE mad~ in
other words, this report r9flects the
component is included in the
assignment of ASCII files to
a freshly loaded system. In
initial content of the .DAT
table.
MODULE MAP
Each line of this report may con~ain up to three entries. Each
entry describes th~ name nf a loaded module as veIl as its
beginning
and
ending addresses.
Note that if any module
modification appendages adjust the image of the loaded module, the
size may not correspond to th9 assembl~d modul~ size. One exaaple
is the int~rconnect kit handler. For this module, the END exit
discards unused tables and then constructs all TTY buffers. These
mamory occupied by thes~ buffers will be reflacted in this report
as a part of the interconnact kit handler.
QIT SUf!MARY
For each function handl~r in the lOP program, a QIT contrel block
is constructed. T'his major centrol block is used to hold work in
ths form of buffers for tha t:andler.
In addition, various handler
=ntry' points are noted in the QIT. Each QIT contains a name very
much like the ASCII files device designators.
In fact~ some names
correspond directly, while ethers are unique (e.g. the one for the
interconnect kit handlpr).
This ~ raport gives the designator
associated with aach OIT as well as the QIT address.
7-29
ENTRY
PO~NT
~AP
R~re are. listed all entry points in the system together with their
~ntry point location values.
If any entry points a~e discarded by
ENT ~xits, these vill not ap~ear. Also, the
entry
poin~s will net appear.
The list is alphabetized.
If an entry
.Scxx and .LOxx
point is referenced but is lever defined, th9 report vill reflect
this fact by using "---~-" rathE~ than an entry point lccation
value. Certain of these unresclved referencas are acceptable. 1n
~xample is the reference to the 2741 modules by 0.51.
It is, in
f.act, the caSE the 0.51 detects the presence of the 27q1 modules
by observing the resolution cf the reference •
. IV.
Appandices
Th~
following appendicee are attached to this document:
Appendix
Appendix
Appendix
Appendix
A
B
C
D
Separate tape lOP leader description
optional lOP reload procedure
"aintainetce guidelines
R~stricticns on relocatable .odules
7-30
When
the
~ranscrib~d'to
optional
copy
of
the
configured IOP E~o9~am is
a magnetic taEe different from the'mastar
tape,
a
spgcial IOP loader program is also written to the tape. This
loader program.is suitable fer loading by the HP2000 ACCESS
bootstrap program which is distributed in paper tape form. When
this loader program has been loaded, it is given control. by the
bootstrap program and proceeds to load the configured lOP program
into the IOP. The forma~ of a tap~ writt~n for this purpose by
tope is as follows:
r---...... .., .. - ..---.-. --....
-~--
...--. .. -_ .... ....' .. ·o._ ... ____
~._,
.... _ -_ ... --- - .... - - - ... .. -,..
~
I
I
I
I
I
I Loader program I T.M. I Copy of lOP program I T.A_ I
I
I
I
I
I
'I. M. = Tap e
Mar k
lcad~r
program reads tt.e seccnd file and transfers it to the
lOP protected loader. This is similar to the lope optional reload
process which reads the special mastar tape ~OP copy file and
transfers it to the lap protEcted loader.
Th~
The loadEr program is initially an assembled part of ropc
itself. The memory page which it cccupies in lope is the same
memory page which it will occupy when loaded hy the HP2000 ACCESS
bootstrap. This is to say that when lope copies the loader to th~
first file of th~ separate tape, its absol~te reccrd images
sp~cify this given memory page.
Additional instructions are added
to causa a JMP to th~ loader from location 4000 which is the
assumed start address for all Frcgrams loaded by the boctstrap.
Th4 internal flow of the loader program is as follows. Thu
program contains thrAe small IIO drivers ~ach of which is noninterruptable (SFS l~gic). ~he first of these drivers is a simple
-consol~ output driver.
This is used to output operator assistance
messages.
An interconnect kit driver is also included. This
driver is used to output t~e absolute records read from the
magnetic tapa.i.to the IOP protected load~r. This dtiver contains a
timeout procedure which is us~d todet'3ct a non-operational IOP
loader. The third driver is, of ccurse, the magnetic ta~e driver.
7-31
This driver em~loys
magn6tic tape.
D~A
to read the copy of the lOP
program
from
th~
The loader receives cont~ol f~om the bootstrap.
The S
registar is preset by the boctstrap vith the magnetic ta~e select
co:~e.
This select code is configured into all magnetic tape 1:/0
instructions. Next, the operator is asked to start the lOP
Frotected loader and to signal the completion of this action by
pressing CR.
(Actnally, any input is accepted.) A prograa loop is
now en-cered in which tape records are read froll the second fila of
t.h9
tapa and transferred tc the lOP.
(Note that no taLpe
posi tioninq is nec.essary, since the bootstrap prograa will ha. ve
advanced to the second file by reading the first file which is the
loader program.) The length of the records read froll the tape is
used to determine the amount of data to be transferred to the lOP.
If any tape errors occur, an error lIessage is issued, and t~he
loader halts. No timeout by ~he interconnect kit driver should
occur prior to the occura tce Qf the tape mark at the end of 1~he
rop program copy file. If one does occur, an error .essage is
issued, and the loader halts. At the end of the file, zeros are
loaded int:) the lOP until a tille.out does occur. This vill instlre
that the lOP protected loader will go to a normal halt.
Messages
follows:
and
halt
codes
used by the loader progta. are as
START lOP PROTECTED LOADER. PRESS RETURN
Ihis message is issued tc the operator to infor. hi, that the
loader program is ready to proceed with loading.
~he
operator
should at this point insure that the lOP protected leader is
running and then press CR to signal that the loader may contin11e.
lOP IS NOT RESPONDING
This message indicates that the lOP protected loader has stoPlped
accepting data from the loader prematurely.
This message is
followed by a RLT 66. No recovery is possible short of restarting
tha entire loading process f%om scratch.
TAPEERRon
Some ·tape error has occurred such as parity, tiaingi etc. The
message is follovedby a HLT 22. No recovery is possible short of
restarting the entire loadin~ Frocess fro. scratch.
7-32
!E.E~.n.Q.!~ ~
.2.eti2!!sl
A
1.~.f n.!~g .E;oc~~:f
answer ·to the RELOAD? question of the initial lope
s3ction indi~ates ttat thp.optional lOP copy file is to
be loaded intc the lOP. Such a copy can· be created by lope at. an
earlier point in time for use in ,r~storing th~ IO~ prcgram for
production us~.
The flow cf control of the reload procass is
outline belo v.
y95
dialoqu~
A message is issued to the operator instructing him to start
pro~ected loader.
wten this is done, the operator signals
tha co~pletion of the acticn by pressing CR. The reload program
then I=ositions to the optional copy file on the master 'tap:e. This
file has lO 65000. Next a loop is ~ntered in which records are
read from the tape and transfar~ed to the rop. The magnetic tap9
driver in the MCP and the irterconnect kit driver in lope (lOPLD)
are used to accomplish these actions. Th~ records read frcm tape
ar~
in the form of absolute binary records. Th= length values in
th~se records Jictates the amount of. data to be transferred to the
toP.
Several error possibilities exist. If the IOP should fail
to accept the data, an appro~riate message is issued, and centrol
is returned to the MCP.
If no lOP copy exists on th~ tape
(indicated by imm~diat~ tape mark)~ an appropriate message is
issued, and control is returned to th9 MCP. It is also assumed
that: the magnetic tape driv9t in the MCP will 'take appropriate
correctiv~
action for any ta~e ~rrors. Normal completicn of th9
load proc~ss is indicated by fcrcing the IOP protected loader to
go to a normal halt. This is don~ cy sending zeros to the IOP
un~il it fails to raspond.
centrol is then given to the ~CP.
th~
lOP
7-33
!.El'~!!!UI
£
!1S1!lUinence gyigelin e ,§
There are sOlie minor and/or obscure detai ls about IOPC and/or
configured top systems which are of importance to .aintainence
F.e-rso~ne~_.
:As many of these details wbich can be reDlelbered nra
out.line below:
~h~
1~
111 modules
2.
A simple techniqoe to effect patches in confi9ured lOP
programs exists. The use of unused base page for the
location of patches is generally siaple. In crder to
place patches on base page, simply patch the second
word of the • ME!!. table to reserve as auch base pl!lqe
as necessary. Thls...location defines the last vord of
a vailable base ~age .for use in satisfyinq dyna aic
buffering requests. If this location is modified prior
to starting the system, the area vill neVEr be .ade
available to any ether part of the srste ••
3.
Patches can be made in the configured prcqram prior to
copying the IOP p~ogram to the magnetic tape. This is
done p~ior to starting the lOP at location 2002 when
directed to do so by IOPC.
4.
The cold dump analyzer list is outlined elsewhere in
this docUment. When the lOP proqram is started, the
address of this fixed length list is placed in location
3.
It can be use d tc forma t cold dUll ps as well as to
~xamine
import~nt control blocks, et. ale in a running
in the standa:rd modules f119 are loacied
into the lOP by tepe. This is true even if the module
cannot be located in .HA!T. only those .odules fro.
the optional modules file will be loaded vhich are
required.
this can be a handy tool to force-load
specialty programs such as stand alone a.aory du.ps,
performance analysis tools, etc.-
system (with DUr!) •
S.
Although there are several control blocks which are not
assembled, thesa sa.e control blocks can
te easily
located.
Examples are 'the • COlt., QITs, EQTs, and
SCOLs. Finding most of these control blocks is done as
follows:
.COM.
is found via' its
7-34
.COK.
entry point.
QITs
can
be
locat~d
using the oIT summary in the lope
report.
EQTs
can
be located using the I/O linkage list in the
rope report.
and BPRTs are located by finding thePULPT entry
point.
At that lccaticn are the three a'ddr~sses of'tha
SCOL ta bles.
These, in turn, address the S'PB'Is.
SCOLs
The
.DVTB
res~ective
and
entry
.tAT
taol(~s
~oints.
7-35
may
be
found vi'a their
R ST PT
To
or:
POIIIJT
,...---1
'BE:lSotNtH"'&
S;""~601. TA61..1:
'Po 'NT 10
'SEGINNtN. 0 F
FLA& 'STo'''6.
P"'OGftAM
. NOT A&''''O~''TfI)
'1ES
.... 0
E)tTt\Ac:r
OP!""TOP-.
Ha~.,..
fOINT 'To
S''T'~'T &" ~ 1M T
W~tt.D
T"&L&
"HOWN
0' 51"",0'-
~NTAy
To
I:N~Y
C L.e'AIl
luofl 1)
SEeo .. !)
o~
S~Mao\.
TAalc
titJ T'-'1
EKTItAC.,FRoM
s..,~eoL.
S'tMe,,~L..
Mavl'
TA6LE
To
NEX, ~'YMSol
TASLE' eNTft Y
SET Po INT'!"
'-0 :D ,~eNt IONS
IN
S"'~8oL.
T~&LE
SE'-
of
Sn'\SOL
T,. &l.e"
-/
I
NE'&A'ie
$1(0"''0
WO~t)
To
""'0"1:
Ne)l.T
To
s"",eo&"
PO'NTE'~
Move
P"ST
IN
STATE'Me NT
FLOWCHART
1
!£.e!ndi,! 12
~nu£tio~
,",t
'~'Thg
sY:$te-m, .
Th~s;e
"'I'Ol'prograll
~r-e-'eicpe'cted
'are':'
',.
'
,g.,n re loca.t~,
!.~J&i
modul~s, which IOPC configures into a running
to be asseabled following certain quidelinE~s.
I'f-' 'the module is a driver or handler which depends on
some I/O'unit reference number (select code or IOC
logical unit nUlber), this number can be merged into
I/O instructions and parameter words by IeEe.
This
vill
allov
the
aodule to ba written excluding
initi~11zation code normally intended to
perfor. this
act'lvity.'
The. leth.od by which this is dcne is to
',aSSEmble' ,eachsnct instructicn or para'lIeter word vjLth
·its relative S9~Ect code or IOC unit reference Dumber.
-"Most drivers, for example, vhich use only one selEtct
code vill assemble all I/O instructions using a zoro
select code. Those which depend on tvo or more should
be 'assembled using 0 for the first, 1 for the second,
and so on. In addition, all such instructions must be
identifi~d
with an entry point of the form ".SCxx" or
".LUxx"
for
select
codes
and
logical'
units
respect,ively.
(Tt.e "xx" aay be any unique character~;.)
rope will add the base select code or unit Duaber to
these inst~;~tions when configuring the lOP program.
2.
The
names
assigned to program modules are very
illlpcrtant." All IIcdule selection is on the basis of 1:.he
nalle found in the HAft statement. In additicn, certain
parts of names are expected to .have certain forms jEor
lope use:
variant 'RJE modules are expected to reflect themselves
via different nallES consisting of a basic .o~ule naae
and a version indicator. ,Par example, the synchronous
fUnction handler is expected to have the name "SIN"
follovedby eithet "IB" for the 18K version or "CD" for
the CDC version. '1hus,
"SYNla" 'or "SYMCD" vill be
ap~topriately saledted by IOpe.
The first t hrE e characters of a,1l functien handler
module names are tsed to generate corresponding .od~le
entry
point
names for prime, I/O complete, and
initiatot entry pcints. Por example, the SYNIB aodule
is expected to have entry points with names "SYIHP",
"SYNHC", and "SYNHI". Of-course, - these entry points
7-36
are not ne&ded if' the
module
respective type o~ ',en:~~t:y. pOint.
does not rEquire the
For
handlers
which ~ JDay be, replica~.e4,"~ ~h-e ~ tbird
, charact er of the ra Ire, as ,we 11 as the 'third vc;har·act~,_.o:f.'
entry point namas is expected to be a digit. ~·;r:hus;".~;£,·6,r·.:,
example, the card reader handler module has a' '~ame"""o'f '.
eRa
and entry
~clnts
CROHI. f , eRO HC, ,an,d~CROHP •.. :IOPC
will increment
replicated.
thes~
'd1g~ts,'
.ach:
time~'~
'
.,
modd~~
is
For
drivers
which- may be
r~plicatgd,' .the
fifth
cha'ract a~ of the tame as we:11 as th e fif til character of
ant ry point names is 'e£p~ct"'e'd~o be a 'digit;': 'thus, for
example, the card reader, ,dr'i vet mod ull! has~~}"a' n~lIe of
D.110
and entry pOin1:sofD ~ 110, I. 110;> '':and P.ll0.
lope increments the:.;..: digits for
each ";'CO'P1 of the
module.
,'"
7-37
Source Exif Data:
File Type : PDF File Type Extension : pdf MIME Type : application/pdf PDF Version : 1.3 Linearized : No XMP Toolkit : Adobe XMP Core 4.2.1-c043 52.372728, 2009/01/18-15:56:37 Create Date : 2002:07:13 16:57:18Z Creator Tool : g4pdf Modify Date : 2009:08:17 17:12:22-07:00 Metadata Date : 2009:08:17 17:12:22-07:00 Producer : Adobe Acrobat 9.13 Paper Capture Plug-in Format : application/pdf Document ID : uuid:e0909678-de17-438c-b9e7-ce971fd9b1ad Instance ID : uuid:4b42847a-5ea1-4f90-8b69-07c1430e720d Page Mode : UseOutlines Page Count : 737 Creator : g4pdfEXIF Metadata provided by EXIF.tools