HEP_Operating_System HEP Operating System

HEP_Operating_System HEP_Operating_System

User Manual: HEP_Operating_System

Open the PDF directly: View PDF PDF.
Page Count: 135

DownloadHEP_Operating_System HEP Operating System
Open PDF In BrowserView PDF
1: EP

0 P.,E R1\ T I "1 G SYST EM

T~BLE

OF CONTENTS

PAGE
1•

EXECUTIVE .••.•....•••..••••...••.•......•.•.•...• -. •.•... 1
1.1

Rect . . • . . . . . . . • • . • • • • • . . . . • . . . . • • . . • • . . . . • . . . • . . . . . 1

1.1.1

Basic Services •......•..............•.•..... 1
1 • 1 .1. 1
1 • 1 . 1 .·2
1.1.1.3

Task Management ••..••••.••...••.... 2
Message Rcutine .•......••...•...... 2
Terminal Service .............•..... 4
I/O Interrupt Services ••.•...•.•... 5
~iscellaneous Services •..•.•••..... 6

1.1.1.4
1.1.1.5

I

1.1.2
1.1.3

Executive Debugguer ..•.•••..•.•........••.•. 7
Switch In~erface .•..•....•.•....••....•..... 8

~.

1.1.3.1
1.1.3.2
1.1.3.3
1.2

ernel Inbound T8sk (KT) ..•........ 9
ernel Outbound Task (KO) •.....•... 9
equest File Task (RF) ..•...•••..• 10

File Manager .•..•.•••.......•.•••...•..••..•.•...• 11
1•2 • 1

Dis k F 0 rrrl pt •••.•.•..••.•.•.••.....•...••.•• 11
i 1 e Form at ...••......•.•....•...• 1 1
irectory Format •...•••.••..••••.. 13
itmap & Reserved Section
(: F 0 rrn at •....•...............•...• 1 R

1 .2. 1 • 1

~

1.2.1.2
1.2.1.3
1.2.2

Basic Fi~~ Management Rcutlnes ..•.......... 19
1.2.2.1
1.2.2.2
1 .2. 2 .3

1.2.3

~

.•••....•••.•••..•....•....• 19
~

•••••••••••••••••••• 19

ogon ............................. 19
. nter .............•....•...•.....• 19

1.2.2.4
1.2.2.5
1.2.2.6
1.2.2.7
1.2.2.8

btain

ockup •••••••

~

t'\ddufd .•..•...•...•••.•••..••..... 19

:Release ..•..•........•.••..•...... 1<)
peletefile ............•••••....... 19
Re n·am e f i 1 e • . . . • . . . • • • . • • . . . • . .•... 20

Executiv',Interface .••.•....••....••..•••.•. 20
1.2.3.1
1.2.3.2

1.2.3.3
1.2.3. LI
1.2.3.5

xecutive Open .•..•.•.•....•.•.... 22
xecutive Close .•..•..••••...•.••• 23
~xecutive Rea~/Write •••••..•..•.•• 24
Executive Obtain .••.•.•••..•.••... 24
Executi ve Logen •..•..•.••...••.•... 21l

~

1

HEP OPERATING SYSTEM
TABLE OF CONTENTS

1.3

1 .2.4

Rcsident Supervisor Intcrface •..•••........ 25
1.2.l~.1
The R~sident OPEN ................. 27
1.2.4.2 Resident CLO:::;E •.•.......•.....•...• 27
1 • 2 • It • 3 Resident READ/WRITE •.............. ?7
1 . 2 • 1t • 1~ Resident OBT'\T'~ ..•......•...•..... 27
1.2.4.5 Resident LOGO~ .........•.........• 27

1 .2.5

Operator Interface ............••.••........ 27

PASCAL Runtime Library ............•............... 29
1 •3• 1
1 • 3.2
1 3. 3
ft

PASCAL Interface ••.....•.•••...•..........• 29
PASCAL Runtime Environment .•.•...•........ o32
Files and File Variables .................... 34
1.3.3.1

1.3.3.2
1.3.3.3
1.3.3.4

1.3.4

Miscellaneous Runtime Support
Ro utines .................................. 38

1.3.1~.5

FIN.IT . . • . . . . . . . . . . . . . . . . . . . . . . . . . . 38
LOGO~I .••..••••..•••...••.•....•..• 39
LINLEN •...•.••..•..•...••..•...... 39
SETID . . . . . . . . . . . . . • . . . . . . . . . . . . . . . 39
GE·fTSK ..........•••....•.....•.... 39

1 .3.4.6
1 • 3 . J~ • 1
1.3.4.8

GE: T L 0 C • • • • • • • • • • • • • • • • • • • • • • • • • • • • 4 a
SETLOC . . • . . . . . . . . . . . . . . . . . . . . . . . .40

1.3.4.1
1.3.4.2

1.3.4.3
1.3.4.LI

1.4

Non-Text Files •...•....•......... _14
Text Files •.•••••..•...•.•...•..•• 35
rile Varinbles ..••.....••....•...• i6
File Descriptcr Blcck •..•.•......• 3S

ERB ............................... 39
&

Tape Mi1nager ........................................ 41
1.4.1
1.1i.2

Overview .................................... 41
Tape Format •..........•..•.•••.........••.• ~1
t~ 0

de. . • . . . . . . . . . • • . . . • . . . . • 4 1

1•4 •2 • 1

R~ c c r d

1.4.2.2

Dump Mode . . . . • • • . . . • . • . . . . . . . . • . . . • 41

1.1t.2.2.1
1.4.2.2.2
1.4.2.2.3

Word Files •••....•..... 42
UFO Dumps ••••••..•..... 42
End of Volume .........• 43

2

HEP OPERATING
Tt\BLE OF

1.4.3

SYSTE~

COI~TENTS

Ccmrnnnds ...•......•......................•.. l l3
1 . H. 3 . 1
1.4.3.2
1.4.3.3

1 • It • 1t
1 • 4 • ')

1•5

HE P D(~ b ug g e r . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ... 4 R

1 •5. 1

1.6
1.7

T() peP 0 sit i c n i n g .................. II 3
Writing n Tape .....•..•.....•. ~ ... 44
Reading a Tape •.....•.....••...... 4 5
1 • It • 3 • 4 1 n d ire c t Cc mrn Cl n d F i 1 e. • • • • • • • • • • • • H6
1.4.3.5 Terminating Command
Processing ..........••.......•.. 46
Fun c tic n a 1 0 esc rip t ion . . . . . . . • . . . . . . . . . . . • . 4 5
Err cr' Me s sag e s • • • • • • • • • • • • • • • • • • • • • • • • • • • • • It 7

C0 en en and Fer mat . . . . • . . . . . . . . . . • • • . • . . . . . . . . . I, 8

Maintenance Process (Net Completed Yet)
Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50

1.7.1
1.7.2

Overview ...•....•.............•.•.......... 50
Comrnands •..••.•...••...•.•.••...•..•...•... 50
1.7.2.1

Log On/Off Commands .......•....... 51

1. 1 . 2 • 1. 1
1.7.2.1.2
1.7.2.1.3
1.7.2.2

File Utility Commands •........•... 51

1.7.2.2.1
1.1.2.2.2
1.7.2.2.3
1.7.2.2.4
1.7.2.2.5
1.7.2.2.6
1.1.2.3

Log On........... ..•... 5 1
Log Off ....••..•.•••... 51
Assistance •••.....•.... 51

List Directory ...•.... e51
Copy a Filc .....•...... S2Delete a File ..•....•• o52
List a File •.•..•...... 52
Rename a File •..•....• o52
Submit a Job •••••..••• o52

Edit Commands •...•.•.•.•••.•...•.
1.7.2.3.1
1.7.2.3.2
1.7.2.3.3
1 • 7 .2. 3. !l

1.7.2.3.5
1.7.2.3.6
1.7.2.3.7

~53

Edit a File •••......•.. 53
Copy Lines .•.••....•••• ')3
Move Lines .••......•.•. 53
Insert a Sequence
of Lines .•...••...••. 53
Reolace a Text
.
S· t rlng
•..•..•..•.••.. r.:J-11
Delete Lines ••...•••••. ')4
Direct Insert •..••.••.. 54

3

HEP OPERATING SYSTEM
TABLE 0F COf.!TENTS

Direct Dclete ......•... 5t1
Find a Text
String •............... 54
1.7.2.3.10 List Lines ••.•...••...• 55
1.1.2.3.11 Renumber the
File ................. 55
1.1.2.3.12 Save the Changed

1.7.2.3.8
1.7.2.3.9

File . . . . . . . . . . . . . . . . . 55

1.1.2.3."3 End the Edit
Session .•............ ')6
1.1.2.3.14 Cancel the Edit ........ 56
1.7.3
1.1.4
1.8

Functional Description ..•...•.............. 56
Running a Job From the Editor .............. 51

Batct1 Monitor ••.....•••..••....•.••..•.••........ $58

1.S.1
1.8.2

·:)vervie\..J .................................... 5<3
Commands .................................... 5'3

1.8.2.1

Job Related Commands ....•••....... 5S

1.8.2.1.1
1.R.2.1.2

1.8.2.1.3
1.8.2.1.4
1.8.2.2

System Related Cornmanris .......... 059

1.8.2.2.1
1.8.2.2.2
1.8.2.2.3
1.8.2.2.4
1.8.2.2.5
1.8.2.2.6
1.8.3

Set HEP Partition
Sizes ..•.•........••• 59
Set Contrcl Card
Processor ....•.•••..• 60
Display the Job Queue •• 60
Display the Jobs in
Execution •••.•••..... 60
Quiesce the System ..... 61
R~sume Normal System
Operaticn ..........•.• 61

Inter-Task Messages •••••....•.•.•••.•..•••. fi1
1• 8 •3 . 1

1.8.4

tJob to Top
of Queue •..•••...••.. 5R
Suspend Job Execution .. 59
Resume Job Execution ... 59
Cancel a Jeb ..•••.••... 59
~ove

HEP 1,1 e s sag e s • • • • • • • • • • • • • • • • • • • • • • 6 1

Summary of Batch ~onitor
Commands .................................. 63

4

HEP OPERATING SYSTEM
T~BLE

OF

CONTENT~

1.9 Reactor (Not Completed YP.t)
1.10 Writer (Not Completed Yet)
1.11 Dist< Builder ••....••••...••.•••.••.••.•••...•.•.... 66
1.11.1
1.11.2
1.11.3
1.11.4
1.11.5
1.11.6
1.11.7
1.11.8
1.11.9
1.11.10

FcrmClt Di s\< •••••••••••••••••••••••••••••••• 65
Initialize Dis1< ••........•••...•...••....•. I)f)
Create User File Directory •••.••....•...... 66
Logon • . . . . • • . . . . . . . . . • . . . . . • . . . • . . . . . . . . . . . 66
B u i 1 d. 80 0 t s t rap Se c to r s •...•...•••......•.. 66

Set Date . . • . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ~7
Set Tirne . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67

Distribution Tape •••.••••••••.•..••... 6 7
Read Absolute S~ctor ..•....•..••.•..•....•. 67
Set Indirect File •.•.•••...••.•••...•...... 6~
1 • 1 1 • 1 1 Shut Down . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
1.11.12 Disk Build Procedure •••••....•.••••.......• 68
Ma~e

HEPOP ERA TI ~J G S YS TEr·,

TABLE OF CONTENTS

2.

RESIDENT SUPE RVISOR •...•....•.•......•....•............. 1
2.1

It Cl
Cl.)

Fi l(~

a File

File
11 e n ·3m e cj F i 1 e

Submit a Job

Edit Commands
1.7.?.3.1

1.7.2.3.2
1 • '{ • ? . ] .' '3
1 • 7 . 2 • 1 . tl
1.7.?.1.S

1.7.2.1.6
1 • 't . ? . 3 . 7
1.7.?1.Q
1 • '( • 2 • 'L ()
1.7.~.).10

Edit a Fil~
Copy Lin~s
:~OVA Lines
Insert 8 S~qu~~cc of
Renln~~ 4 T~xt
D~lp.te Lin~~~

Strin~

Dir0ct Insert
f)ir('\ct D/110.t~
~tn~

~

T~xt

Li3t Lines

3

~trin1

Li~es

H SPOP E R!\ T I q G SYST r:: t-1
T~BLE

OF

CONTE~TS

1.7.2.3.11

Ren~mbcr t~e File
1.7.2.3.12 Save th~ Chan~ed File
1.7.?.3.13 Eni the E1it Session
1.7.?.3.14 Canc21 the Edit

1.7.3
1.7.11

Description
RU:1ning n .Job From th,~ Editor

Fu~ctional

3Qtch Monitor
Reader
1 • 1 0 ':.Jr it e r
1.11 9isk Builder

1.1
1.9

Format Dis,-<
Initialize Disl<
1.11.3 Create User File Directory
1 • 1 1 • 1\
Logon
1.11.5 Build Bootstr~p Sectors
1.11.6 Set Dat~
1.11.7 Set Time
1.11.8 ~ak~ Distribution Tape
1.11.0
R~ad Absolute Sector
1.11.10 Set Indirect File
1.11.11 Sh ut D(H~n
1 ., 1 1 • 1 2 Disk Bui11 Procedur~

1.11.1
1.11.2

4

H SP () P ~ RAT 1 nG SYST E:-1

TABLE OF CONTSNTS
2.

RESIDEnT SUPERVISOR
2.1

:

If the u=VALUE" suffix is omitted, the specified item is
printed, otherwise it is set to the entered value.
Type
10 is a single character describing the item to be
examined or modified. Valid types are shown below.

TYPE

RANGE

MEANING

Blank or omitted

0-177776

Computer Memory Address

A

0-6

Memory Address Mapping
Rp.gisters

B

0-7

Breakpoint Locations

c

Count of Waiting Output
Terminal Messages

F

Fla~

Showing Dispatching

St ate
p

Examine

on 1 y,

Continues

From
Bre3kpoint
Head of Input Message Queue

Q

R

Genernl Purpose Registers

0-7

s

Processor Status Word

7

HEP OPERATING SYSTEM
Range is entered
as a
single octal
integer or pair of
integers separated by a comma. For modify operati~ns only the
first
range value is used;
fer examine operations, all
locations between the two values are displayed.
Task
ID selects the task whose data 'is referred to.
TasK 10 may be emitted when examining computer memcry, and
absolute
locations are when referred to. Only locations in
the
first
40K of real memory may be accessed this way, and
only for examine.
Tne
Ex~cutive
Debugger is also used to print messages
generated by error
traps from other Executive tasks. These
messages include the trap type, task 10, PC and status word
of the trapping task. Trap types are:
RS
IL
00
MM
BP
EM
FP
IO
PF
1.1.3

-

Privileged Instruction (usually HALT)
Illegal Instruction ot Nonexistent Memory
Odd Address
Memory Management Violation
Breakpoint
Emulator Trap (not used by this system)
Floating Point
lOT Trap (not used by this system)
Page Fault - Memory Management Error

Switch Interface

A
major
communications path between
the
HEP and
Executive t~5ks
is
the
5wltch interface.
Tnis interfnce
appears to the HEP as a set of 16 memory locations, of which
tnree
are presently used. A HEP memory access is broken into
two
parts - a request
and A responsa. Tn~ switch interface
generate3 a
Root interrupt when a request is received, but
does not generate a response. Responses are generated under
software control of the responsible Executive task.
In ~rder
to
facilitate
use of the switch interface,
tnree
small Executive .tasks are incorporated into the Root.
These
tasks
are
activated
by Reot interrupt code when a
switch request
is received.
They/read the contents of the
switch request and send it to toe apprcprinte Executive task.
These Root task3 are described on the next page.

8

HEP OPERATING SYSTEM
1.1.3.1.

Kernel Inbound Task (KI)

The Kernel
Inbound Task is used by all Executive
tasks wisnlng
to
send messages to
the HE? Kernel.
During HEP IPL, each PEM sends to KI the address of its
communications area.
This information is saved by KI.
After saving its addres~, the ?EM then attempts to read
a word from the switch interface. KI holds this request
and
issues no response.
After receiving
the read
request,
KI enters Message W~it state via Trap 2. When
an Executive Task wishes to send a message to a HEP
proces~or.
it begins by sending
a Seize with Reply
message
(Type
13) to KI. KI places the communications
area
address for
that
processor in the message and
is~ues
Trap 10
(Reply).
This places KI in Reply Wait
and
activates the originnl sender. Tne sender writes
data
to
the
communications
area and
sends an
Activate-W~th-Reply
(message type 14)
to KI via Trap
10.
This causes KI to respond to the outstanding read
from
the PEM, using the contents of the message as the
response data. The PEM process receiving the data uses
it to control message processing. After precessing, the
PEM issues another read
request. This causes a Root
interrupt
wnlcn activates
KI.
KT
generates anothp.r
Reply message to the original sender and enters Reply
Wait.
This process continues until the transaction is
completed.
At this pvint,
the
sender generates a
Release (message type 15) with no r'eply and sends it to
KI via
Trap 10.
KI frees the message with Trap 4 and
issues Trap 2 to get its next input message. Tne reply
mechanism causes KI and a HE? Executive task to run as
co-routines
during
HEP mes~age transmission,
and
provides an
interlock allowing sharing of the switcn
interface without conflict between multiple senders.
1. 1• 3 • 2

Kern e 1 Ou t b 0 u n d T~ s k (K 0 )

The

Kernel
Outboun~
Task handles unsolicited
from the Kernel to the Batch Monitor Executive
T3sk.
During initialization, it enables interrupt~ on
tne
switcn location
used
for
tni~ purpose. Wnen an
interrupt
is received"
it assembles tne switch data
int0 a message and forward~ it as a Switch Message with
Reply
(message ty~e 12) to the Bntcn Monitor. When the
Batch Monitor completes messnge processing, it replies
to
KO,
and
KO genArates a swltcn response. frees the
buffer
and
reenables
interrupts
for
the next
unsolicited me~sage.

me~sages

9

HEP OPERATING SYSTEM

1.1.3.3

Request File

T~sk

(RF)

The Request File Task is similar to the KO task
(in fact,
most of the code is common) except that a
different switch location is used and me~sages are sent
ta
the File Manager rather than the Batch Monitor. The
RF
task
is used
for commu~ication8 between HEP
supervisor tasks and the file system.

10

HEP OPERATING SYSTEM

1.2

File Manager

All di~k
IIO
in the
HEP System
(except during IPL) i~
performed
by the File Manager. Oper~tions supported by the File
Manager are:
Logon - Validate User ID
File Open - Locate an Old File or Create a New One
Read a-Physical Record
W:ite a Physical Record
Obtain the Address of an Unused Physical Record
File Close - Close, Delete
In addition, operator commands

exi~t

or

Rename a File

to:

Enter Debug Mode
L~Clve

Debug Mode

Add a Use: ID
Snut Down the File Manager
reCld/\rlf'ite ()p~:atl()ns, the File Manager merely perform,~
control functions and data transfer on behalf of requesting
Executive
T~skg
or
HE?
3upervi~or
processes.
For other
cperat~cng,
the
File
Manager
performs directory search/update
functions and s~arch/update of the disk free section tRbles.
Fo:

disk

1.2.1

Disk Format

Tne
~ystem
di~k
i~ J
fixed s~ctored 300Mb movinR head
disk wltn a 1.2 Mbyte/second transfer rate. Sectors are 512
bytes (6q HEP words) lon~.

1.2.1.1

File Fermat

Files in
the HEP system Rre a doubly-linked list
of physical records. ERCh record contains two HEP worrls
uf linkar,e information, followed by 62 words of data.
is part cf the record and i~
Tne
link8ge info:mation

1I

HEP OPERATING SYSTEM
made
available
to
and
supplied by all
softw:are
interfacing to the File Manager.
The format of a
pnY3ical record is shown in Figure A.
THIS

THIS

THIS

NEXT

SECTOR

CYLINDER

NEXT

NEXT

TRACK

SEGTOR

WORD 0
CYLINDER

TRACK

FILE
RELATIVE
LAST
\~ORD

LAST

LAST

USER

SECTOR

NO.

NO.
RECORD NO.

1·

CYLINDER

TRAaCK

WITHIN
IN FILE
USER

--:
HORD 2-6 -

DATA

Figure A - DISK RECORD FORMAT
Tn~ cylinder, track and sector information is u~ed
to
chain
records
together.
Mainten~nce
of this
information is the
responsibility of Executive and
supervisor tasks calling the File Manager - it is n~t

c n (~ c ked

0 t'

mc d i fie d

bY t

ne

F i 1 eM;) n il g ~ r~

ex cept

d u 1'" i n g

file accesses for internal File Manager purposes.
Tne "next"
fields of the last record in a file
contain all zeroes; similarly, the "last" fields of the
first record of a file contain all zeroes.
The user number,
file number and record number
fields are used
for
file consistency checking and
system
debug.
.They should be maintained
by all
Executive tnsks and HEP supervisors.
Ine format I~f tne "this" "next" and "last" fields
is referred
to as a Itdiskaddres~tf and is the standard
fvrmat
for
representine
disk
locations.
Each
diskaddres8 occupies 32 bits (1/2 HEP word).
t

12

HEP OPERATING SYSTEM
Directory Format

1.2.1.2

In the HEP system t
files are accessed
via a
tree-structured directory system. At the- leaves of the
tree are disk file headers. Each file header occupies
one record,
and contains complete information about a
single file.
The format of a file header is shown in
Figure B.
\-lORD

o

THIS ADR.

PREV. ADR.
USER

FILE

RECORD

NO.

NO.

NO.

NEXT ADR.
2

3

CKSUH

LENI

OCOUNT

DATE

.I

1
DATE

AC DA TE

5

FREG

LREC

6

UFD

FHP

7

REGSIZE

MOD.-

I

ACPRIV

EOF\'1

I

FLEN

FILENAME

Figure B - FILE HEADER FORMAT
The
format of wc)rd 0 and word 1 of a file header
is
standard.
These words are
used to link all file
headers for
a particular user
into
a
file named
'HEADER'.
Tois file is automatically maintained by the
File Manager. By reading this file, a u,er p;ogram may
obtain the
n8m~
and ~ll pertinAnt ch~racteristics of
311 of its files.
The remaining field~ in the flle
oe a de r
per t a i n t f) the s pee i fie f i 1 e ::j n dar e dis c u sse d
beloH.

HE? OPERATING SYSTEM
LEN

- Tne length of toe file name in bytes.

CKS U!'1

- Toe exclusive OR of all
in toe file name.

OCOUNT

to~

character pairs

Tne number of users whc have this file open.
If negative, one user has the file open, and
additional opens are not allowed.

MODDATE

- A 48 bit field containing the date and time
this file was last closed by a user with
write access. The date is in standard system
date format,
described
in Section 1.11 Disk Builder.

CRDA TE

- Date this
format.

file

was

created,

in standard

ACDA TE

Date this file was last accessed.

FREe

The diskaddress of the first record in the
file.
All
files have at least one record,
which may contain no data.

LREG

- The diskaddress of toe last record of toe
fi Ie.

UFD

- Toe diskaddress of the UFD record pointing
to this file. UFO records are discussed on
the next page. This pointer is used during
file deletc/ren8me operations.

FN?

- Tne diskaddress of the
file 'HEADER' for
this
user.
Used
for
file delete/rename
operations.

REGSIZE

The record size in HE? words of the records
in this file. This informaton is not used by
the File Manager,
who neals in physical
records only.

HEP OPERATING SYSTEM
ACPRIV

- Access privileges for
this file. The high
byte of the
field
controls public access
privileges,
while the low byte controls the
users own access privileges. Bits in each
byte are defined as follows:
• •••••• 1

Read Access

• ••••• 1 •

Write Access

• •••• 1 ••

Extend Access

• ••• 1 •••

Exclusive Access

• •• 1 ••••

Semaphored Access (not used)

• • 1 •••••

Delete/Rename Access

• 1 ••••••

Execute Access (not used)

1 •••••••

Access Change Access

EOFW

- End of file word.
The word number of the
first
free
ward
in the l~st r~cord of the
file.
All
files must be an integral number
of words long.
All
file8 must contain at
least
one
word;
for
an
empty file.
FREC ~ LREC and EOFW: O.
If a file is an
integl'al number of physical records long, an
extra record
ie pr~sent at the end of the
file, and EOFW z O.

FLEN

- Tne
record number of the last record 1n the
file (zero relative).

FILENAME - The 1 to 448 character name of the file. The
filen~me
is stored in a byte-swapped format
within each word.
Character~
are
in the
order ehown below:
f

1

I 0 I 3 I. 2 I 5 I

Tnis
is
Executive
bytes.

~

11

7

I

6

I

way the
consequence of the
computer
(a PDP_l1)
addresses

15

HEP OPERATING SYSTEM
In
order
to
speed
up searching
the
file
directories,
an indexing file,
called the User File
Directory, or
UFD,
is maintRined for each user. This
file resides in the directory of the distinguished user
whose
ID is
'000000000000'. The name of this file is
UFD.
XXXXXX,
where
XXXXXX
is the ID of the user in
question.
The format of the records in th~ UFD file is
snown in Figure C(a) and Figure C(h).
HORD 0

THIS

NEXT

\O/ORD

LAST

COUNTS

t-l OR D 2

LEN

CKSUfv1

FHA

\-/OR D 3

LEN

CKSUH

FHA

·

·
·

\IOR D 63

LEN

CKSUM

FHA

Figure C(a) - UFD ENTRY FORMAT

TRACK
LEN

CKS lJM

CYLINDER

SECTOR
FHA

Figure C(b) - UFD ENTRY FORMAT
The

LEN and
CKSUM
fields
in a
UFD entry are
of tne corr~3ponding
fi~ld3
in the file
neader
to
Hnj.cn it refers.
The
FHA field
is the
diskaddress of tne
fileheader
for
the
file.
When
searching
for
a file, the File Mana~er need only read
tne file ne~ders of files with corresponding length and
check~um
fields. Since 62 files mRY he'referred to per
UF D r e c I) r d, a con 3 ide r A b I P. S a v i n r. i n 0 pen tim ere :3 U Its •
Tne
UFD is automatically maintained
by the File
Manager, and i~ net visible or accessible to th~ user.

~uplicatQs

16

HEP OPERATING SYSTEM
In order
to permit access to files from multiple
users,
the
User File Direct6ries are pointed to by a
higher level directory called the Master File Directory
or MFD. This file is also held under the distinguished
ID
'000000000000'. Toe format of an MFD record and MFD
entry is shown in Figure DCa) and Figure" DCb).
WORD 0

THIS

NEXT

WORD

LAST

COUNTS

HORD 2

USER
UFDA

ID

WORD 3

·
·

·
WORD 62

USER
ID

\-10 R D 63

UFDA

Figure DCa) - MFD RECORD FORMAT

USER IO

I

CYLINDER

I

TRACK
UFDA

I

SECTOR

Figure ·D(b) - MFD ENTRY FaRHAT
The u~er 1D is a 12 cnaracter (padded with blanks)
character string in byte-~wopp~d format ~s described
for
file na~e8.
The diskaddress points to toe first
dnta
record cf the corrAsponding UFD. Eacn u~er in the
system nas a sin~le MFD entry.

17

HEP OPERATING SYSTEM
The
UFO's and MFD are maintained as files by t~e
File Manager.
Access to
their data
is not made by
normal
file
access mechanisms.
Tne File Manager
searches
and
updates these
files
using
internal
routines not available to other tasks~ The MFO, the UFO
fer
the distinguished user, and ether 'files are built
by Disk Build during disk initialization.
1.2.1.3

Bitmap and Reserved Sector Format

Wnen additional sectors are required for a file on
the disk, an unused secter is allocated using the disk
bitmap.
The bitmap is a file consisting of one record
on each disk cylinder. Bits in the data portion of the
record
correspond
to
sectors on tne cylinder. Since
there are
32 sectors on
a track. and 19 tracks per
cylinder,
19 two-word pairs are used to repregent the
cylinder.
Bits correspondiing to allocated sectors are
zero.
while unallocated sectors have l's in their bit
pOSition.
The bitmap record
i8 cn a fixed track and
sector on all cylinders. Its location is determined by
Disk Build. For convenience, a standard file header is
built for
the bitmap. under the distinguished user TO
'000000000000'. The name of the file is BITMAP.
The File Manager maintains the bitmap record for
cne cylinder in core at all times. All requests for
records are allocated
from this cylinder until it is
full. At this point, the File Manager moves to the next
highest cylinder
(modulo the mnximum valid cylinder)
until
available sectors are found. Thus bitmap IIO is
minimized,
and
all
files being extended at the same
time will go on
the same cylinder if po~sib'le. This
reduces di~k latency and improves performance.
Cylinder 0, track 0, sectors 0 and 1 are unique in
that tney are marked allocated in the bitm3p, but are
net part of any file.
Sector 0 i~ the hardware
bootstrap,
and
~s
described
in conjunction with toe
Di~k
Builder.
Sector
1 is the File Manager and IPL
p()inter ~ector.
The THIS field
of ~ectcr 1 point~ to the first
record of the MFD.
Toe LAST fip.ld of sector 1
p\)iny'~
to
tne bitm;lp.
Toe data portion of sector 1
cantain~
pOinters to
IPL files and i , described with

data

Di'3k Build.

18

HE? OPERATING SYSTEM
1.2.2

Basic File Management Routines
1.2.2.1

OBTAIN

OBTAIN is used to get an unallocated sector in
which to write data. The sector is marked allocated by
OBTAIN.
1.2.2.2

LOOKUP

LOOKUP is used to search a user file directory for
a specified file. If the lookup is successful, the file
neader of the file is made available to the caller.
1.2.2.3

LOGON

LOGON is used
to locate a specific user file
directory.
If the logon is successful, the diskaddress
of the UFO is made available to the caller.
1.2.2.4

ENTER

ENTER is used to add a file header to a specified
user
file
directory.
An initial data
record
is
allocated
and
initial values in the file header are
supplied. No duplicate file checking is performed.
1.2.2.5

AODUFD

ADDUFD is used to create a UFD and enter it into
the MFD.
It is only activated under operator command.
No duplicate UFO checking is performed.
1.2.2.6

RELEASE

RELEASEi8 the opposite of OBTAIN, and is used to
free sectors in the bitmap wnen files are deleted.
1.2.2.7

DELETEFILE

DELETEFILE is used to remove a file header from a
UFD,
delete the file header record, and queue the file
data records for rieletion. Since tois prcces~ may be
lengthy,
it is handled as a 'demon' du~ing otherw1~e
idle File Manager time.

10

\

HEP OPERATING SYSTEM
1.2.2.8

RENAMEFILE

file header to
RENAMEFILE updates a UFD and
contain a new name. Note th~t only the name of a file
can be cnanged, not its owning UFO.
1.2.3

Executive Interface

Executive tasks communicate with the File Manager using
the
standard system message mechanism. Several message types
are p!""ocessed:
TYPE

MEANING

6

File Open

7

File Close

8

Record Read

9

Record Write

10

Obtain a Sec tor

11

Ll')gon

A common message format is used fer open, close,
and write. Tnis format is shown in Figure E.
16 Bit
\'10

rd

0

UIO

1

2

RQ TYPE

3

BUFAD

4

BASE

5

OPLEN

6

S TA TUS

7

ACCESS

8

OPTION

23

CHARACTERS

Figure E - OPEN/CLOSE MESSAGE FORMAT

HEP OPERATING SYSTEI1

Tn~3e

fields are used as follows:

UID

- Diskaddress of user's
close) •
Supplied by caller.

RQ TYPE

- If 0, open for output.
If 'nonzero,
open for input (open,
close).
Supplied by caller.

BUF AD

UFD (open,

Address in caller's space of disk
record (open, close, read, write).
Supplied by caller.

BASE

- Base of· user stack div 64,
close, read, write).
Supplied by caller.

OPT LE N

- Length of option cnaractArs (open).
Supplied by caller.

STATUS

- Result of operation (open, close,
read, write).
Set by File MRnager.

ACCESS

- Requested access cedes
(open, close)
for
tnls
open - s~t
by
File
M8nnger.
Based on option string on
o p(~ n •
Supplied by caller on close.

(open,

OPTION CHARACTERS - ASCII characters specifying
(open, close).
Open or close options
Valid options are:

IH
IR
IA

IT
IN

::

::
:-

::

Hrite Access
Read Ac c e s s
plus
(extend
Append
Acces!'3
positicjn tc~ end of file)
Tempcriiry File
¥
(delet.(~
old
Ne \-1
if
File
prese~t)

2 1

HEP OPERATING SYSTEM
Option
precessing
is provided
as
a service to.
Executive
Tasks.
Not
all option bits are used by the
File Manager. P~sitioning to end of file (/A) and file
del~tion
en close
(IT) are the responsibility of the
caller.
Bits are
set
in
ACCESS to
indicate these
options were
specified,
but action in" these options
must be taken by the caller. The low byte of ACCESS has
the format described fer ACPRIV in the file header. The
high byte is as follows:
• •••••• 1

Temporary (IT)

• ••••• 1 •

Append

• •••• 1 ••

New (IN)

(/A)

All message communication with the File Manager
uses
the
Root reply mechanism, and the File Manager
responds to Executive requests via Trap 10 (Reply)~
1.2.3.1

Executive Open

An
Executive
task opens a
file by issuing
message 6.
The BUFAO field of the message pOints to a
disk record.
In
this record, the FILENAME, LEN, and
RECSIZE fields are
supplied
by the user (RECSTZE is
only used
if tne file is to be created). The FILENAME
may contain a user TO in square brackets at the start,
Rnd
may contain access options in par~nthesis at the
end.
Access options are only u,ed if the file is to be
created.
The open routine USEROPEN strips the u,er TO
and
options.
If the
user
TO was prescnt, tne File
f1anager uses LOGON to locate the UFD, otherwise the UFO
diskaddress in the open message is used. The access
options are processed into tne ACPRIV field of the user
is file header, and LOOKUP and ENTER are used to locate
and/or create toe
file.
Access privileges resulting
from
the
processing of the mes~age option string are
stored
in the me~Bage ACCESS field and coecked against
ACPRIV in toe
fil~
he~der.
If valid privileges are
requested tne actual disk file nender Is wr~tten to the
callers disk record, and tne me8~age status is s~t to
o. If not, the message status is non-zero and the file
header is not supplied.
Tne format of tne acce~s ccd~ strin~ following tn~
file
name is;
(PRWEXD,
URWEXD)
where
the
string
beginning with 'PI d~nctes public access privileges and
tne
strin~
be~inning
witn
'U t
oenctes
user access

HEP OPERATING SYSTEM
privileges.
suppl ied :

Any or all of the access characters may be
R - Read Access
H

Hrite Access

E - Extend

x - Exclusive
D - Delete/Rename
Tnese characters determine the permanent access
attributes of the file if it is created by open.
Error returns from open are given in Table F.
STA TUS

ERROR

-64

Nonexistent User ID

-65

Bad Message Options

-66

File Existence Conflict
(duplicate file or nonexistent file)

-69

Requested Access Denied

-70

Exclusive

-71

Disk I/O Error

-68

Attempt to
Create File
ether Enter Failure.

Acces~

File Already in Use

in Another UFD or

Tnble F - OPEN ERROR CODES
1.2.3.2

Executive Close

An
Executive task closAs a file by issuing
message 7.
Tne
format of tne message is as indicnted
previously.
The
file
neader painted to by BUFAD must
contain t~e diskaddr~s~ of the file ne~der to be closed
in tne
'THIS'
field.
If toe first character of the
option field
in tne message is '0' the file will be
deleted •. If the first character is 'R'. tn~ file will

.,.,

HEP OPERATING SYSTEM
be
renamed
and
the
LEN and FILENAME portions of the
file header mU8t contain the new name and its length.
Error codes from CLOSE are given in Table G.
STATUS

ERROR

-18

Delete or Ren~me Not Done Access Violation or File Open by Other Users
(delete only) by Other Users (delete only).

-19

New Name is Duplicate (rename only).

-11

I/O Error
Table G - CLOSE ERROR CODES

1.20'3.3

Executive Read/Write

Executive
task8
read
and write
records via
mes8age 8
(read) and mes~age 9 (write). Only the BUFAD
and
BASE fields
are u8ed in these messages. Data is
read
frcm or written to the diskaddress specified by
the
'THIS' field of the record pointed to by BUFAD. No
checking
is done on
the validity of the address or
anything
e18e.
This is the responsibility of the
calling task.
1.2.3.4

Executive Obta'in

while extending a
fil~,
an Executive task
an additional disk record, it issues message
'10.
Tn e
File Manager uses
the
OBT~IN
routine
to
allocate a sector, and the diskaddress of the sector is
returned to the call~r in the first 32 bit~ of the d~ta
portion of tn~ message.
If,

requires

1.2.3.5

Executive Logon

Several
File M~nager calls requirR the caller to
specify the diskaddre8s of a
UFO.
Inis address is
obtained
via message 11.
A calling
tnsk places th~
twelve character user ID of a user in th~ first twelv~
byt~.9
of tne dat~
portion of th~ m~s.9~Be. The File
M8nager u'es tne LOGON routine to reac~ the MFD for tne
UFD addres,. If ~ucces9ful, the diskaddress of the UFD
is returned
in
the
first
32 bits of the messaga,

"'''

HEP OPERATING SYSTEM
replacing
the first 4 ch8racters of the user 10. Logon
error codes are:
STATUS

MEANING

-19
1.2.4

No Such User 10

Resident Supervisor Interface

The File Manager provides I/O services to HE? processes
in much the. same way as it does for Executive Tasks. For
Executive tasks, IIO is performed directly into toe caller's
buffer.
Since HEP data memory is not part of the Executive
computer's address space, HEP 1/0 is handled differently.
HEP requests arrive via the Unibus-to-Switcn Interface
and
the File Manager's helper task RF. The message received
by the File Manager is a switch message (messag~ 12) and
contains one HEP word of data. The high 16 bits of the data
word are a request code type with the following values:
0

-

Logon
Open

2

3

-

4

-

Write Record

5

-

Obtain Record

Close
Read Record

Toe low 32 bits of the word point to a 66 word I/O
block.
Tne last 64 words of this block are a disk record in
toe
format previously di~cu3ged. Toe first two words contain
IIO p3:Rmeters and options. Tnese words are dp.scribed below.
CODE

uro

STAT

,

E

0

,

I

64 WORD DISK RE80RO
Figure H - HEP liD REQUEST FORMAT

25

I

A

HEP OPERATING SYSTEM

CODE - Request code, as enumerated above
STAT - Result status supplied by File Manager. Values as
indicated for Executive Requests.
UID
A
D

- Diskaddress of user file directory (open, close).
Requested access privileges,
Table C (open, close).

format

as

shown in

- File. history (open,close). Possible values are:

o -

Use Old File if Present,
Else Create New File

1 - Delete Old File if Present,
Create New File
2 - Use Old File

3 - Create New File
Fail if Old File is Present
E

- File Disposition (close). Possible values are:
- Delete File
2 - Keep File
5 - Rename File

The File Manager reads toe I/O block into a loc~l buffer
using toe low speed bus (LSB) Interface to HEP data memory. The
amount of data read depends on the request code in tne switch
message.
After performing the request, all or part of the I/O
block is written back to datn memory with the L~B. Since the
LSa is shared with other Executive tasks, the File Manager
becomes uninterruptable during this transfer.

26

HEP OPERATING SYSTEM
1.2.4.1

The Resident OPEN

A HEP supervisor opening a file does so by building
a dummy file header in the I/O block. For old files, the
file
name and
name length are required. The file name
must be
stored
in byte swapped
fermat as previously
described.
For newly created
files,
the
RECSIZE and
ACPRIV fields must be supplied. Unlike Executive opens,
no option
processing
is provided.
The only optional
function is the provision of a user ID in square brackets
at the start of of the File name.
If the open is successful, the File Manager copies
the file header into the I/O block.
1.2.4.2

Resident CLOSE

Resident CLOSE is the same as Executive CLOSE except
that
the
file disposition
field
is used to determine
close action.
1.2.4.3

Resident READ/WRITE

Resident
I/O is the
same as
Executive I/O. The
'THIS'
field of the disk record in the 1/0 block is used
to determine the diskaddress.
1.2.4.4

Resident OBTAIN

Resident
OBTAIN uses the standard OBTAIN routine to
allecate
a
disk record.
The
address of the record is
returned
in
the 'NEXT' field of the disk record in the
I/O block.
1.2.4.5

Resident LOGON

Resident LOGON obt~ins tne 12 character user ID from
fir' s t
12
b Y t e 9 0 f t h 0. d i. s k r e c () r din t n e I 10 h 1 0 c k
(word 2 and the hig~ half of word 3). The user ID must be
byte
swapped.
The diskaddress of the UFO is returned in
tne UrD field of the I/O bleck (second half of word 0).
the

1.2.5

Operator Interface

Tne operator may s~nd mess~ges to the File ManaRer from
tne
con~ole
terminal.
The
~upported
m~8~age~
begin witn a
single character, as sriown on tne next page:

27

HEP OPERATING SYSTEM
D - Toggle the debug switch. Wnen debug is on, all received
messages are listed on the console in octal.
Z - Snut down.
Tne bitmap is written to di8~ and the File
Manager executes a halt.
No files are closed, and the
File
Manager
may be restarted
with the
Executive
Debugger (XD).
If a file
is being deleted when Z is
entered,
the message
'BUSY'
will
result and the File
Manager will not shut down.

28

HEP OPERATING SYSTEM

1.3

PASCAL Runtime Library

Tne
PASCAL Runtime Library provides the interface between
PASCAL READ,
WRITE and associated IIO statements and the file
manager.
Components of the PASCAL runtime are linked into all
Executive tasks. In addition to IIO, the PASCAL runtime provides
the basic runtime environment and service subroutines for PASCAL
tasks.

1.3.1

PASCAL Interface

The PASCAL runtime 8upports a set of IIO cal18 similar
to
that provided by standard
PASCAL.
Certain unneeded
capabilities are not suppcrted, and several extensions have
been made.
Supported text output procedures are:
WRITE(CHAR:N)
Write the character CHAR to the
WRITE(F,CHAR:N) OUTPUT, followed by N-1 blanks.
WRITE(I:N)
\0/ R I T E ( F , I : N)

WRITE(S:N)
WRITE(F,S:N)
HRITELN
HRITELN(F)
BREAK(F)

file F or to

string tc the
Hrite integer I as a decimal
file F or to OUTPUT, followed by blanks to a
to tal
width of N. If N is negative, write I
a s an octal string.
Write the character string S to F or to
OUTPUT' followed
by blank8 to a width of N
characters.
If N is less than the length of
S, S is truncated. S may be a literal string.
Terminate a line.
Terminates
a line but
carriage to a new line.

does

not

advance

Multiple 1/0 items may be combined in a WRITE request.
If WRITELN is used
with output arguments,
the
line is
terminated after the last item.
Real 3nd boolean output 3re not supported.

29

HEP OPERATING SYSTEM
Supported text input procedures and functions are:
READ(CHAR)
READ(F,CHAR)

Read one input
input.

READ(S)
READ(F,S)

Read a string of input characters into S from
F or INPUT. If the current line is exhausted
before filling Sf pad with blanks.

EOLN(F)

A boolean function whicn is true if the next
character to be read 1s the end-of-line
character.

EOF(F)

A boolean which is true when there are no
more characters to be read.

READLN
READLN(F)

Discard remaining characters in the current
line (if any) and pOint to first character of
next line.

cnaracter into CHAR from F or

Multiple 1/0 items may be combined in a READ request. If
READLN is used
with input arguments, the rest of the line is
discarded after the items are filled.
Integer, real and boolean input are not supported.
The
standard procedures GET and PUT may be used with text
and
non-text files.
When used
with a
file connected to a
cor-sole.
GET
exhibits non-standard
behavior.
Tne
PASCAL
~tandard
requires that the first cnaracter of input be present
i mme d i ij t c 1. y
aft e r a REA D LN. In to i s imp 1 em e n tat i (,) n, the fir s t
cnarncter 1s not
present until
a GET or READ operation is
performed. Toc first GET consumes a dummyblnnk character. This
cnaracter is not provided by READ; character strings consumed
by READ contain only actual input text.

Wnen used with non-text files,
the record definitions
acceptnble
to GET Rnd PUT are rAstrictcd. Tne followinR record
s i z f'!

~

8 Y'

e ace e pte d :
(::136 Byte3

248 Bytes
496 Bytes

30

HEP OPERATING SYSTEM
Other
sizes would
require
present in toe runtime routines.

data blccking facilities not

The
standard
procedures
RESET and
REWRITE have been
extended
to
allow opening
specific
disk files by name. The
syntax of these prccedure3 is as follows:
RESET(F,NAME,OPTIONS,V)
REWRITE(F,NAME,OPTIONS,V)
RESET is used
to
refer
to
a pre-existing file, while
REWRITE causes toe creation of a new file. The parameters are:

F

Name of the PASCAL file variable controlling this
file.

NAME

character
arr~y
or literal string containing
the
file
name.
If omitted on a RESET, the file
presently open is rewound. If name is a character
array, the file" name must be non-blank and padded
to the right with blanks.

OPTIONS

A
character array or literal string containing
option
characters.
Each option
is
a
slash
followed by a single character. Availnble options
are:

A

R

Read Access
Write Access
A - Append Access
T - Temporary File
N - Force New File

W -

If
OPTIONS is omitted,
supplied.
For
RESET,
IR
REWRITE,
IW and extend
defaults.

v

default options are
is the default. For
permissions are
the

Integer variable.
On entry, contains tne record
length to be associated with the file if the file
is created. Inis may differ from the record size
of toe file variable. Tne file is processed based
on the
file
variable if non-text, but the line
length is is taken from V if the file is text. V
is in HE? words (multiples of 8 bytes). On return
frem
RESET/REWRI1E,
V cont~ins open stntus. If
V~Ot ~t i3 the record eize of tne file,
in HE? words.

31

HEP OPERATING SYSTEM

Files may be
PASCAL procedures.

closed, renamed or deleted by calls to the
CLOSE(F)
RENAME(F,NAME,LEN)
DELETE(F)

CLOSE(F)
is a standard procedure and may be used to close
any file. RENAME and DELETE are nonstandard external procedures
and mu~t be declared with external declarations of the form:
PROCEDURE RE~AME(VAR F:TEXT;VAR NAME:;
LEN; INTEGER).
EXTERNAL;
PROCEDURE DELETE(VAR F:TEXT);
EXTERNAL
F may
declaration
deleted.

be declared to be another type than TEXT, but the
must agree with
the
file type to be renamed or

Files will also be closed if a RESET or RE\IRITE is issued
for tneir file variable specifying a new file name.
1.3.2

PASCAL Runtime Environment

A PASCAL Exeoutive Task is loaded
by the
ROOT in a
standard
fasnion.
Of the 8 memory pages, the first four are
reserved
for oode.
Page 7 is mapped to IIO space. All PASCAL
v~rinble3
and
working
sp~ce
is located in pa~e 4. The first
locnt!cns in
this page, ~tartinR with location 100000 (octal)
are u~ed fer control information. This information is shown in
Figure 1.3.1.

32

HEP OPERATING SYSTEM
~1NEHONIC

MEANING

LOCATION

$KORE:l00000

Top of Heap Space, Base cf Stack Space

$FREE=100002

Start of Linked List of Free Blocks of Length
$ NE\J1.. N .

$RESR5xl00004

INITIAL R5, SAVED BY MAIN

$RESR6,.100006

INITIAL R6

$NEHLN:l00010

Length of
Dispose

$FILBF=100012

Start of Linked List of Free File Buffers

$FILTB=100014

Start of Linked List of Free File Variables

$LOGCYxl00016

Users UFD Location (CYL)

$LOGDA::100020

U3ers UFD Location (Track, Sector)

$FILE=100022

File Variable Ad d re s s Address

$SPAGE::: 10002 l ,

Dummy Blanks for Get Processing

$ F t-1 T S K :::: 1 0 0 0 2 6

Task ID of File Manager

$r1LEN::l00030

Length of Last Queue Message

$SINP=100032

Standard Input File Variable

$SOUTP=100034

Standard Output File Variable Address

$HEAP:::I00036

Start of Heap Space

Storage

Fig u r e 1. 3. 1 - PAS CAL

tv 0 RK

Manipulated

by

New and

Addre~s

ARE A BAS E

In
a running PASCAL task, the register SP points to local
variables.
and
register
R5 pOints to the globAl variables.
During
initialization,
file
variables are allocated in the'
locations
following
$HEAP.
The number of file v~riables is a
compile-time
parameter.
normally 6.
$KORE
is
set to point
immedlnt01y after toe file vAriables, And SP is set to point to
location
120000,
the
tap of page 4. Tne file variable8 for

33

HEP OPERATING SYSTEM
INPUT and
OUTPUT are initialized,
and
the main program i~
started.
Tne main program immediately calls the NEW procedure
to get space for global variables. This causes R5 to be set to
tne value of $KORE, and $KORE is incremented by tne size of the
globals.
Immediately after this call, a task which uses disk
files
or the
NEW/DISPOSE mechanism must call the
FINIT
procedure.
This procedure allocates
space for the requested
~umber
of file description blccks immediately above the global
variables.
Since FDB are more than 600 bytes long, only the
number absolutely required
should be requested.
Tne other
effect
of
FINIT is to define the block size
used
by
NEW/DISPOSE.
Thi3 size overrides the
size specified in the
NEW/DISPOSE calf to prevent storage fragmentaton.
In operation, local variables of procedures use the stack,
wnich grows dcwnward from location 120000. Calls to NEW use the
Heap,
wnich grows upwards from the top of the FOBs. If these
two areas collide, unpredictable runtime errors will occur, and
the program must be recoded to use less storage.
1.3.3

Files and File Variables

supported
by the
Several
types of files are
runtime. Tnese are dividerl into text and non-text files.
1.3.3.1

PASCAL

Non-Text Files

Non-text files are accessed via GET and PUT, and must
reside en disk. Tnese files may be word 0: record files, as
de~cribed
below.
For these
files,
the amount of rlata
transferred
by a GET or PUT is strictly d~termined by the
file variable record size. The ru~time is only capable of
hRndling
spanned
records if tn~ record size is less than
17 HEP \%rds, ·...(oien i3 why the record sizes are restricted.
Record
files consist of a sequence of fixed l"ength
d s , e a c han i n t e g r a 1 n mb e r 0 f HE P \-10 r ci s Ion g. .h' 0 r d
files
nave no external record structure and are normally
prace3sed a word nt a time. Tne PASCAL Runtime ignores word
Gr
recorrl
structure for non-text files, treating them as
record
files with the r~cord length determined by the file
variable.
A permanent record
length may be specified by
REWRITE wnich need net agree witn tne flle variable size.

!~ e C I) r

u

34

HEP OPERATING SYSTEM
1.3.3.2

Text Files

Text files are of three types: console or queue files,
word files on disk and record files on disk.
Con~ole files interact with the system queue mechanism
and
are
used
to
pass data between tasks or to and from
terminals. An input line in the queu~ can contain a maximum
cf
118 characters of input. On output, data is broken into
~ultiple
messages
if
the data content exceeds
118
characters. The files INPUT and OUTPUT are console files by
default.
Other
files may be declared as console files by
using
the distinguished
file
name 'TI:'. Since there is
only one input queue and one output queue, having multiple
files
as console
files
yields unu~ual
results. Output
characters will
be merged
on a character by character
basis,
while, input will appear at whichever file variable
was most recently accessed.

Word
text
files
contain variable length ASCII text
lines.
All
lines contain a multiple of 8 characters, and
are padded with blanks if'necessary to become a multiple of
8. Since ASCII characters contain only 7 bits ot data, the
sign bit of the
first
character of a line is used to
delimit
lines.
Lines
span
physical
record
boundaries.
Manipulation of the
sign bit is an automatic function of
toe
runtime library, and data visible to tne using program
never contains a set gign bit. Since the Executive computer
p3ck~
bytes right
to
left,
while tne HE? packs left to
rignt,
the
runtime
librRry performs
a byte
swapping
operation on every physical record of word text f~le8. Tnis
is done on both
input
and
output 50 that disk data is
always in HE? (left-tc-ri~ht) order. The runtime pads lines
witn
trailing
blanks on read string operations, but does
not strip trailing blanks on write string operations. There
is no restriction on line lengths in word text files.
Record
tp.xt
files
ccntnin
fixed
lengtn ASr;rr text
All
lines contain
th~ same number of characters t
wn!ch must be a multiple of 8. Lines may sp3n physical
record boundaries. All 2~6 possible charact~re may ~ccur in
a
record
text
file.
R~cord
lenBths may net
exceed
488 bytes.
Output
to a record t~xt file will be truncated
cr
padded
witn blanks as required to fit the r~cord size.
Input
will be
padded
with blRnks
as truncHted en read
,f) t r i r: g
,) per ::J til') n 3 •
ny t ~ 5 \-1 3 P pin g () n i n put 11 n rl ,) U t put. i s
per f c to me d t (I for C P. d i ~ k 11 1 t () t () b ~ in H F. P f c rm ;:) t •
lin~8.

35

HE? OPERATING SYSTEM
BIT
NAHE

VALUE

_i.9 CTAL ) .

t-1 E ANIN G

S. EOF

100000

File has reached EOF.

S.EOLN

40000

Text file is at EOLN on input.

S.LAST

20000

Disk file
record.

S.TXT

10000

File is a text file.

S.ERR

4060

Error
fi Ie.

S.HAlT

2000

Queu~

S.END

1000

Output disk file has terminated a line,
but not started a new line.

is

in

encountered

the

last

while

physical

precessing

or
console
file
requires
physical read before supplying data.

a

Table 1.3.3 - FILE VARIABLE STATUS BITS
Tne
saved
pointer
field (V.SVP) is u~ed if V.?TR is
pointing
to
a space at end of line in order to locate the
next actual datn character.
V.BUF points to
the
start of the current logical
record
for
a non-text file, or to the stRrt of the buffer
for
a
text
file.
If a logical record i~ spanned, V.AUF
point~
to tne psueda-st3rt of the IORicnl recorrt preceding
th8
rlctuAI I/O buffer. V. aUF is advanced by each PUT or GET
operation.
For console
files,
V.AUF points to the first
cn~racter of data.
V.LEN contnins the record length to be used for this
of tne file. For text files, this number is -1. V·.LEN
is
rlet~rmined
by tne
size of tne record dAclared in tn~
u~erts
PASCAL program.

OPEN

V.FDB points
to
tne
file descriptor block for tnis
file. For a console file, V.FDB is O. Tne I/O control block
is de~cribAd in trie next gection.

V.Eon points to tn~ end of valid dRta in t~e I/O
control
block.
Normally,
tnis is tne end of tne pnysicRl
rAe I) r:-j, but I~ n t (} ~ 1 a ~ t !' e \; (j r ri 0 f t ne f lIe tV. E 0 B poi n t s t 0
tn~ end of tne data. For console file~t V.EOB points to trie
end of toe message.

31

HEP OPERATING SYSTEM
1.3.3.3

File Variables

A
file
variable occupies 7 16 bit words in the
Executive
Computer.
File variables are compiled into the
runtime library. The number of file variables which may be
simultaneously active is
a compile time parameter in the
runtime.
An
Executive task may have many files declared,
but only a limited number of these may be simultaneously
~pen.
The RESET/REWRITE procedure establishes a pOinter in
the
user's variables tn
the actual
file variable. The
format of the file variable is shown in Figure 1.3.2.

ADDRESS

o

V.PTR

Pointer to Current Character or Record

2

V.STAT

Statu~

4

V.SVP

Saved Pointer

6

IV":"BUF

Start of I/O Record

I

Record Length

Bits

10

l----l
V. LE N

12

V.FDB

Pointer to File Description
(0 for Con$ole File)

V. EOB

Pointer to End of

14

-_...-....-

FIRurA

1.3.2

(-1

if Text File)

Fi~e

I/O Buffer

FILE VARIABLE

V.PTR always points to the current charRct~r in a text
or to a reserved location containing a blank, if the
text
file
is at EOLN. For non-text files V.PTR points to
tne
start cf the record, either in the current I/O block,
or to a work area used te collect spanned records.
fIle,

Tne
lew byte of V.STAT contains the destination task
number
if the
file
is
a
queue or console fil~, and is
unus~d
otnerwise.
Th~ hiBO bytp of V.STAT ccntRins statu,
blts, defined in Tnble 1.3.3.

36

HEP OPERATING SYSTEH

File Descriptor Bleck

1.3.3.4

All disk files require a file descriptor block. A
fixed pocl o( FOBs is created during PASCAL initialization,
and disk file OPEN's in exces~ of the pool size cannot be
accommodated. Tne format of an FOB is shown in Figure 1.4.
WORD

o

PHYSICAL
RECORD BUFFER

512.

DISKADDRESS OF
FILE HEADER

5 1 6.

ACCESS
PRIV
EOF WORD IN
LAST RECORD

518.
520.655.

SPANNED RECORD
HORK AREA

Figure 1.3.4 - FILE DESCRIPTOR BLOCK
1.3.4

Mi~cellaneou~

Runtime Support Routines

Several
utility routines are included in the runtime
These are described below.

p3ck~ge.

1.3.4.1

FINIT

Declar~tion:

PROCEDURE FINIT(NFDB,NEWSrZE:INTEGER)
FINIT is called once by every main program
to define the number of FDB~ and the 3ize ~f the
area returned by NEW.

38

HEP OPERATING SYSTEM
1.3.4.2

LOGON

Declaration:
FUNCTION LOGON(VAR UID:ARRAY[O •• 11]
OF CHAR)
LOGON invokes the file manager to logon as
the user UID. If successful, the locations USERDA
and USERCY in the runtime base are set up to
point to the UFO. If logon is successful, LOGON
returns TRUE. else FALSE.
1.'3.4.3

LINLEN

Declnraticn:
FUNCTION LINLEN:INTEGER
LIN1.EN
returns
console input line.
1 • 3 • II • 4

the

length

of

the

last

SET I D

Declaration:
PROCEDURE SETID(F:TEXT;TSK:INTEGER)
SErIO sets
file F to TSK.
1•

3 • 1l. 5

the

destination of the

con~ole

G Err S K

Declaration:
PROCEDURE GETTSK(VAR N:INTEGER);
GETTSK obtains the t~~k number of the task
whose two-character ID is placed in N. Tne value
is returned in N as two bytes. The low byte of N
is the task number of the requestp.d tc-Jsk.' The
nlgn byte is the ta~k number of the task c~lling
GETTSK.
1.3.4.6
D(~

ERR

c 1 a r:3 tic n :

FUNCTION ERR(F:FILE OF ••• ):BOOLEAN
f i 1e

ERR
Cl n d

ctne!'"wi~e

the S.ERR
ret u r~ n s TRI J Elf
FALSE.

te~t~

39

II

bit in V.STAT of tne
n e r~ r ern a soc \; u red ,

)

HEP OPERATING SYSTEM
1.3.4.7

GETLOC

Declaration:
PROCEDURE GETLOC(VAR F:TEXT;VAR L:
ARRAY[O •• 4]OF INTEGER);
GETLOC returns the p~esent file position in
the file F.
This information may be used in a
subsequent call t~ SETLOC.
1.3.4.8

SETLOC

Declaration:
PROCEDURE SETLOC(VAR F:TEXT;VAR L:
ARRAY[O •• 4]OF INTEGER);
SETLOC sets the file position of F to the
information contained in L. SETLOC may only be
used
fer word files with read access only. The
information in L must correspond to the file
presently
open
as
F.
Alteration
of the·
information in L between the call to GETLOC and
the call to SETLOC will probably result in system
failure.

40

HEP OPERATING SYSTEM
1.4

Tape Manager
1.4.1

Overview

The
Tape Manager runs as a task under the Executive and
performs all
tape handling
funotions.
The, task may be
accessed only from
the operator's oonsole.
Commands to
rewind,
spaoe over files, and position to end of volume (end
of the
last
file)
are supported. Individual files may be
cop!ed
to or from tape, and entire UFOs may be dumped to or
restored
from
tape.
The Tape Manager reads and writes the
tape unit directly by manipulating
the appropriate
IIO
locations in th~ PDP-11 memory_
1.4.2

Tape Format

Two
format modes are supported for data on tape: record
mode and dump mode.
1.4.2.1

Record Hode

In record mode each physioal tape record contains
one logical
record
as defined when the disk file was
created.
The
file is terminated on tape by a file mark.
Record mode format is created only when an explicit file
name Is specified tn be copied and the file is defined to
be of record type. Record mode fermat may be read only by
explicitly specifying
a file name, and results in the
creation of a record type disk file whose logical reoord.
size is defined to be the length of the tape record read.
Therefor~
it is not necessary (or possible) to supply a
record size in the command to the Tape Manager.
1.4.2.2

Dump Mode

Dump mode format is used for copying word type files
fer. dumping and
r'estoring UFOs. In dump mode 'each
phy~ical
tape
record
is 514 bytes long, except for the
last record in a file, which is a short record. Dump mode
fermat
is created either by explicitly specifying a file
wnich
was created
as
a word
file
(logical
record
length ~ 0)
or by requesting a UFD dump (dump all files
~n the specified User File Directory).

and

41

HEP OPERATING SYSTEM
1.4.2.2.1

Hord Files

In
the C8se of copying a specific word
file,
each 514-byte tape
record
contains a
physical disk record,
including the 16-byte
block header and
followed
by 2 bytes whose
content is undefined.
The la8~, short record
contains
the
last
physical
disk record
including header, truncated to 2 bytes past the
end of the actual
file data. Therefore the
length of the short record is always 2 bytes
more than a multiple of HEP words. In the case
where the actual
file data
exactly fills a
physical disk record,
the
short tape record
following
the last block will be 18 bytes long
(16-byte header plus 2 trailing bytes). The
file is terminated on tape by a file mark.
1.4.2.2.2

UFO Dumps

The
first record
of a
UFO dump is an
identifying
record
containing
the
ASCII
UIO (User
Identification)
in the
first
12
bytes.
The high byte of the UID has its sign
bit set to mark this file as a UFO dump. The
remainder of the record is undefined. Following
the
UFO identifying record arc all the header
records
(from file HEADER for this UID) except
the
header record
fer
file
HEADER.
Tnese
record~
are
u~sd
to
identify tne
files
contained
in the dump. Each header record i~ a
pnysical
disk record,
including the 16-byte
block header.
followed
by 2 undefined bytes.
Following
~he
last header
record i~a short
record,
18 bytes long, which indicates the end
of hender records. The content of each file in
the
UFO follows,
in the
same order as the
header records.
Regardless of defined lc~ical
record
length,
each
file in the dump has the
same
format on tape as a word file. E~oh tape
record
cQntains
a
phYSical
disk record,
includinB the 16-byte bleck neader and followed
by 2 bytes wnich in
tnis C8,e contain the
defined
logical record length. Th~ last record
in eRch file is a short record, indicating the
end
of the file. Tn~ last file in the dump is
follcw~d by a file mark which indicates th~ en1
e f t h ,=

d \.l rn p

f () !"

42

t

fl ~ S

UF D•

I f mu 1 tip 1 e UF D '

8

HEP OPERATING SYSTEM
were specified,
mark.
1.4.2.2.3

the next UID follows the file

End of Volume

Following the last file on a tape (either
single file or UFD dump) is an additional file
mark, resulting in two consecutive file marks.
This indicates the end of data on the tape. The
Tape
Manager
will
not allow reading or
positionihg past the double file marks. More
files may be written to
tape, resulting in
.writing over the second file mark. The new last
file is then terminated by two consecutive file
marks.
1.4.3

Commands

Tne Tape Manager is accessible only from the operator's
console, directed by commands in the
form of messages
pref8ced by
'MT:'
(the task
IO for the Tape Man::lger). A
command may specify tape positioning only, may direct that
the tape be either read or written with a string of one or
more file names or UIOs, or may direct the Tape Manager to
read commands from a file.
1.4.3.1

Tape Positioning

Each tape ·positioning command
is pref~ced
by a
slagn ('I')
to distinguisn it from
a file name. The
command mnemonics and corresponding operation~ supported
are as follows:
'/RH'

- Rewind; pOSitions tne tape at load

, I AP'

- Append; positions the tape at the second of the
two consecutive file marks which indicate end
of volume; at this point, more files may be
written to
the
tape,
overwriting the second
file mark and resulting in rt new end of volume.

point~

'IFFn' - Forward
file;
positions tne tape immediately
past the nth file mark forward from the tope's
current position;
if !I is not specified, 1 is
assumed;
if end of volume 1s encountered, the
ccmmand
ie
termin~ted
leaving
the tape
po 8 i t i (.) n P. d t n e s !1 me f1 ~ f 0 r~ 'I Apl.

43

HEP OPERATING SYSTEM
Multiple tape ·positioning directives may appear in a
single command
line; each leading
slasn serves as a
delimiter.
Each directive is performed in order, left to
right.
Examples:
'MT:/AP'

- Positions tne tape at end of volume.

'MT:/RW/FF2' - Positions the tape at the start of the
third file or dump on the tape.
1.4.3.2

~riting

a Tape

Writing to tape is indicated in a command line by an
equal
sign (:) preceding the list of files or UIOs to be
copied to tape. Tape positioning commands may precede the
equal
sign;
tnese will be performed before writing the
tape.
A uro specification must be enclosed in square
brackets ('[]'). A file specification may include its uro
(in square brackets), otherwise the last uro appearing in
a
file
specification (in the same or a previous command
line)
is assumed. Multiple file or UrD specifications in
a command line mu~t be separated by commas.
Tape positioning commands may be interspersed in t~e
list of file or UrD sp~cifications and will be performed
in
the order encountered. When a tape
positioning
directive
follows a file or uro specification. the slash
may
serve
as the delimiter, so that the comma following
tne file or uro specification may be omitted.
Examples:
'MT:/AP=[300302]' Writes the
UFD dump for 300302 at the
end of existing data on the tape.
'MT:=[001001]HEPOS,CONTROL/RW' Copies
001001

tne
tw~
named
files
from urn
to tape, tnen rp.winds tn~ tape.

44

HE? OPERATING SYSTEM
1.4.3.3

Reading a Tape

Reading
frem
tape
is indicated
by an equal
sign ('x')
as the
last character in the command line.
Preceding the equal ~ign is a list of one or mere file or
UrD
~pecifications,
separated
by
,commas.
A UIO
specification must be enclosed in square brackets ('[]').
A file specification may include its uro (in square
brackets), otherwise the
last
UrD appearing in a file
specification
(in the same or previous command line) is
assumed.
Tape positioning commands may be interspersed in a
list of file
specifications and
are performed in the
order
specified. In the case of restoring UFD dUmps, the
specified
UIOs are restored in the order in which they
occur en
the
tape
regardless of their order in the
command
line;
therefore tape pOSitioning directives are
not useful except at the end of the urn list. When a tape
positioning
directive
follows
a
file
or
uro
specification,
the
slash may serve as the delimitp.r, so
tnat
tne comma
following the file or uro specification
may be omitted.
Examples:
'MT:/FF,[300302]ABC/FF2,XYZ:' -

Copies the
second and fifth files from
tape into urD 300302.
'MT:[001001],[300300J,[300302]/RW~'

-

far
urn, 001001,
Restores the
files
then
rewinds the
300300,
and
300302,
tape.

45

HEP OPERATING SYSTEM
1.4.3.4

Indirect Command File

An
indirect command file is a text file, each line
(logical
record) of wnich is a command line as described
in
the
preceding
sections on
reading,
writing,
and
positioning
tape,s.
The leading
'MT:' found irl console
commands is ommitted from commands in an indirect command
file.
Tne
Tape
Manager is directed
to
process
the
commands in
a command
file
by a message
from
the
operator's console of the form:
'MT:@[UID]file name'.
The'Tape Manager then opens the specified file and
read3 and
performs each command
until end of file is
reached.
A command
file may contain
any legal Tape
Manager command except '@ •.. '; that is, indirect command
files may not be nested.
1.4.3.5

Terminating Command Processing

Wnen
the' Tape
Hanager is
finished
processing a
command
line or
an
indirect command file, the message
'MT:' is displayed on the operator's console. If the Tape
fir) :1 age r
encounter s
an error wh i 1 e pro c e 8 sin g a command,
an
error message is displayed cn tne operator's console
and
proc~ssing
of tne command line or indirect command
file i3 terminated.
If it
i8 desirable
to
prematurely terminate the
processing of a
command line or indirect command file,
tnis may be
accomplished by sending any message to the
Tape
Manager.
Processing of the current command or file
of commands
will
halt
and
the
new message
will be
precessed as a command.
1.4.4

Functional Description

In
record mode,
disk
file,
arA read or written with
3tnndard
calls to
tne
runtime I/O routines. In dump mode,
nowever,
since
tape records are equivalent to physical disk
records,
tne overheRd of unblocking, rp.blocking, and moving
datD
is
avoided by trRn~mitting eacn record between the I/O
buffer
and
tne
t~pe
directly.
This
i~
accomplish~d
by
~nanipulating the disk file variable (in a3s~mblY lRnguage) to
point
to
tne end
of th~
bleck ~fter cRch tape transfer,
f 0 ~. c i n r~
t h n. n ext cal 1 t I) t n e a p p r r; p r i ;'1 t e T / a r () uti net 0 d (') a
pny~ical r~ad or write of the ~i3k f~le.

46

HE? OPERATING SYSTEM

1.4.5

Error Messages

MESSAGE

MEANING

Un k n ;? wn Ac c 0 U:1 t - U I D -

Tn e U I Din a com man d, i s n Q t k n c wn to
the system.

Command Error

Command not recognized.

? ;:) ram e t erE}' r

Illegal

0

r

Invalid parameter in command.

Functio~

Bad Tape Format

Tne tape
format does not match tne
command being processed.

End of Volume on Tape -

Premature end of volume reached while
processing a command.

Tape I/O Error:nnnnnn -

Bad status after
a tape operation;
nnnn is the status.

Tape on Write Lock

Attempt to write on a tape which has
no write ring in.

urD

Table Overflow

Tne list of UI03 to
be dumped or
restored
i~
longer than the p;ogram
can accomcdate; remaining UIOs will
not be processed.

Bad

Directory

An
error
was
encountered
processing a file header.

Command

Tap0

J\borted

Unit Not Ready

in

Tne current command line or indirect
command
file
nas been prematurely
termin~ted
due
to error or operator
intervention.
Tape unit

47

i~

off-line.

HE? OPERATING SYSTEM
For
R,
C,
? ri n d D 1" e que ~ t S t if::  i 8 8 pee i fie d ,
trie contents of the location specified by (Starting Address>
are replaced by .
<

For all requests,
trie
processor tc
be acceseed is
specified by toe
processor parameter. If this parameter is
emitted, p~ocesscr 0 i8 assumed.
In
the event that the  parameter is prcvided,
tne
HE? Debugger will send the input message back to the
originating task when the operation is complete. This allows
the
Daten Monitor
to determine when a dump is complete and
the HE? resourpes may be freed.

HEP OPERATING SYSTEM
1.5

HEP Debugger
Tne

Debugger is used to examine and modify HEP memory
the
PSW queue.
It
is normally used by the Batch
Monitor
fer
taking user dumps,
but can also be used from the
operator's console.
a~d

HEP

exa~ine

All HEP Debugger functions use the KI task and cede in the
HEP Kernel
to obtain HE? related
information.
Thus the HEP
Debugger cannot be used
if the Kernel or the UNIBUS to switch
interface is not working. In these cases, program and data memory
may be examined u~ing the IML maintenance task (MP).
1 .5.1

Command Format

The HEP Debugger responds to single line text commands
with toe following syntax:
[J[,Ending Address)[.PJ

.:"[I.e: F i 1 en am e >]~)
"
r
[: is omitted, and the leading ch~rRcter
of
tne
starting address is numeric, datA memory is assumed.
If

is
omitted,
it
defaults
to
.
If the
I' qualifier
and the
::  qua 1 i fie r
are ~ b sen t ,
for R, C , P, and D r e qu e ~ t
types,
all memory
locations between  and

are
displayed.
For S requ~st types.

is taken a8 ~ task number, and all PSW's
witn tnat task number are displayed.
If
data is
I
is
specified,
the requested
'vlritten
specifip.c1.
Fer S
in binary format to
trie
file
requests to a file, all ?SW's~are dumped.

48

HEP OPERATING SYSTEM
1.7

Editor"
1.7.1

Overview

The HEP System Editor is a line-Qriented text editor
whicn operates on sequence numbered word type or cn sequenced
or non-sequenced record type files of text. The Editor also
performs file
utility functions
such as listing, copying,
renaming,
or deleting
files, listing tne user's directory.
a~d
submitting a file as a job.
Options
for
terminating
an edit
session
include
canceling the edit (preserving the original file), saving the
updated file under a new name (preserving the original file),
and replacing the original file with the updated file. In the
18tter two cases, the updated file may be saved as a reccrd
file,
with or without
sequence numbers, or as a sequence
numbered
word
file.
The Editor supports the inclusion of
lines of text from an auxilliary input file, which may be the
file being editted~
A separate Editor task" services each terminal or port in
tne
HEP system; all the Editor task~ share the same program
code but each has its cwn data space.
1.7.2

Commands

Tne
Editor is the only task which communicates with
terminals other thnn the operator console, therefore messages
(ccmmnn~s)
to a terminal Editor are not prefaced by any task
identifier. However, the operator ccnsole is also serviced by
an
Editor task, and its identifier 'ED:' must preface Editor
r:1 e e ~ ~I g e ~ .
CC In man d s t c) t neE d l. tor f::\ 1 1 i n tot nr e e cat e g c r i e ~ :
leg
onleff
commands,
file
utility commands,
and
edit
commands.
Any command which results in substantial output to
the
terminal may be prematurely terminat~d
by typing a
carriage r~turn.
In tn~ following command descriptions the syntRx of each
command
is given.
Capital
letters in comm~nd mnemonics
represent
the minimum portion of the word to be supplied for
command recogniticn.

50

HEP OPERATING SYSTEM
1.7.2.1

Log On/Off Commands

Whp.n no
user is logged en to an Editor task, that
task monitors any signal on the
line looking fer a
carriage return at various line speeds to determine the
speed
at whicn tne terminal
is operating. Therefore
before legging en,
it is necessary to type carriage
return until the system responds with a greeting.
1 • 7 • 2. 1 • 1

La g

On

HellQ [uid]
Tne user wnose identification number appears in
the backets is logged onto the system. The Editor
responds by displaying a greeting with the current
date and time.
1 • 7 • 2. 1 • 2

Lo g Of f

Bye
The user is'legged eff the system. If an edit
was in progress, it is aborted. The Editor responds
by displaying the date and time.
1.7.2.1.3

Assistance

A user who is logged on may obtain a display of
all the Editor commands and syntax by typing '?'
1.7.2.2

File Utility Ccmmanris

1.7.2.2.1

List Directory

LD
The name of each file in the legged-en u&er's
fIle directory is displayed, including the logical
record
length. the
file
size
in blocks, and the
creation, last modification', and last access dates.

51

HEP OPERATING SYSTEM
1.7.2.2.2

Copy a File

CF file specification, file name
A file.
named
by the
second
parameter, is
allocated
in the u~er'8 UFD and the contents of the
file represented
by the first parameter (which may
include a
UID) are copied into it. The output file
must not already exist.
1.7.2.2.3

Delete a File

DF file name
The named
file is deleted frem the user's UFO
and the space allocated to the file is freed.
1.7.2.2.4

List a File

LF file specification
Tne contents cf the
file
(which
another UFO) are listed en the terminal.
1.7.2.2.5

may be in

Rename a file

RF file name, file name
The
file
in the user's UFO named by the first
parRmeter is renamed
to the second parameter. The
second file name must not already exist.
1.7.2.2.6

Submit a Job

SUbmit file specification
The EditQr builds and sends to the Reader task
a
message
containing
the
UID and
file ·name
specified,
to be submitted as a job stream. If the
file
specification does not contain a
UID, the
lo~ged
on u3er's UrD is used. If the parameter is
not
prcvided, the updated version of the file being
editted is submitted.

52

HE? OPERATING SYSTEM
1.7.2.3

Edit Commands

In the
following
syntax descriptions, parameters
appearing in square brackets are optional. The letters N,
M, L, and I represent numbers.

1.7.2.3.1

Edit a File

Edit file name
The Editor initiates an edit session for the
specified
file. This includes copying the file to a
word
file if it is a record file and assigning
sequence numbers if it is not sequenced.

1.7.2.3.2

C~py

Lines

Copy N[-M)[/file specification),L[,I]
The Editor copies line numbers N through M from
the specified file, inserting them in the file being
editted,
starting at line number L and incrementing
by I.
If M is omitted, only line N is copied from
toe
file. If toe file specification is omitted, the
lines are copied
(replicated) from the file being
editted.
If I
is omitted,
the last
increment
specified in any command is u,ed.

1.7.2.3.3

Move Lines

He v e N [ -H ] , L [ , I]

Lines N through M are inserted starting with
line number L, incrementing by I, and the lines are
deleted from their former position. If M is omitted,
only line N is moved.
If I is omitted, the last
increment specified in a command is used.

1.7.2.3.4

Insert a Sequence of Lines

Sequence L[,I]
Sequence insert mcde is est~blished, starting
w!tn line number L ~nd incrementing by I. The user
is prompted
for
eacn line of text by a display of
toe next
li~~
numb~r
in sequence. The p;ccess is
terminated
by typing a cRrriage r0turn as toe only
c n a r ;') c t e !' c n () 1":' n e, 0 r bye v e r 1 CI P pin g a n ex:!. ,'3 t .i fl ;S
line number in tn~ f!le.

53

HEP OPERATING SYSTEM

Replace a Text String

1.7.2.3.5

Replace /string l/string 2/(N[-M]]
The first occurence of string 1 is replaced
with string 2 in every line in the range. If M is
omitted,
the range is the entire file. The slash
delimiter may be any char~cter.
Delete Lines

1.7.2.3.6

pe 1 e te N (-M ]

Tne specified line or

r~nge

of lines is deleted.

Direct Insert

1.7.2.3.7

N text
Line N is placed in the file, containing the
text
following the line number N. If line N already
e xis t s, i t:3 con ten t s are rep lac e d b Y the new ·t ext, •
1.7.2.3.8

Direct Delete

N

1..i ne
1.7.2.3.9

nu~nber

N i

1'3

del eted from the fi I

P..

Find a Text String

Find /l'3tring/[N[-M]]
The
Editor searcnsl'3 the
specified
r~nge of
lines for occurences of the string and displayl'3 on
the terminal
all
lines containing the I'3tring. The
sl;')sn delimiter may be any character.
If '11 i8
c;mitt~d.
only
line
N
in
~e;Jrched;
i f N is al~1)
omitted, the entire file is senrcned.

54

HEP OPERATING SYSTEM
1.7.2.3.10

List Lines

List [N[-H]]
All lines in the file in the specified range
are displayed on the terminal. If M is omitted, ~nly
line N is displayed;
if N is also emitted, the
entire file is displayed.
1.7.2.3.11 Renumber the File
Number N[-M],L[,I.]
~he
Editor renumbers the
specified range of
lines,
assigning new sequence numbers etarting with
L and incrementing by I. If M is omitted, only line
number N is renumbered.
If I is omitted, the last
increment specified
in a command is used. If the
renumbering of the range would cause the file to be
out of sequence (i.e. lines following the range have
lower numbers,
or lines preceding the range have
higher numbers), then no renumbering is done.

1.7.2.3.12

Save the Changed File

SAve [file name][,Rn][/S]
or
SAve [file name][,W]
The updated
version of the file bein~ editted
is saved.
If file name is specified, tne file is
saved
under that nnme,
ann
the original file is
retained,
otnerwise the updated file replaces the
original file. If Rn is specified, the flIp is saved
as a record file with a logical record length of n/8
HEP words; if IW is specified, the file is saved as
a word file; oth~rwise the file is saved as the same
file
type
as the originnl file. If IS is speci·fied
<) n
are COt' d f i Ie, t h 0 .CJ (! que n c e n Ll mb (~ r s are s ::t v e d a ~
p~rt
of tne file and tne logicnl record length mu~t
allow fer the 1-HEP-word sequence number per record.
If IS is n~t specified, toen the sequencA numbers
are saved
o~ly if the crieinal filp was sequ~nced.
The save command does not tak~ the user out of edit
mode; updating may cor.tinue frem toe point of snving
tne intermediRte file.

55

HEP OPERATING SYSTEM
1.7.2.3.13

End the Edit Session

Off
The Editor terminates an edit and closes all
fi I es •
If
the e d i t f i 1 e h a 8 bee n .m 0 d i fie d, a 8 a v e
command must be performed before the eff command is
accepted.
1.7.2.3.14

Cancel the Edit

ABort
The current edit is terminated and the updated
file is deleted. The original file is retained.

1.7.3

Functional Description

The
Editor applies updates .to a temporary copy of the
file;
the actual file is not affected until the user issues
tne
save command.
It
is always possible to cancel an edit
session, leaving the file as it was before the edit started.
During
editting,
an input and an output file are open.
Tne input
file
is initinlly the original file unless the
original
file
is a record
file;
the output
file
is a
temporary file.
None of the file being editted is kept in
memory;
the
first
time the input file is r~adt a table of
disk addresses is built, evenly distributed over tne file.
Tnen
fer each command, the disk addrees from the table whose
3~quence
number
is nearest to but less than the line number
referenced
i~ u3ed to position the file.
From that point the
file
is read
sequentially to process the command. Updated
line~
~re
kept
in a table
in memory and
override the
corr0~poncting lines in the file.
Inserted lines are also kept
in
the
table. When the table becomes full, a portion of the
input
file
is written to the output file, incorporating the
c h () rq:~ e:'3 in
t h~
tab Ie,
un til the c h i3 n get a b 1 e i 8 par t 1"a 11 y
empty.
From
this point on, the output file is also accessed
for input, nnd the corresponding portion of the input file is
ignored. Tne renumber command, however, results in the entire
updated
file
being written to output with the new ~equence
number~.
Anytime
the
la3t of the updated file is written
0ut.
tn2 old
input file is closed, th~ output fil~ becomes
input,
Dnd
a new output
file
is allocated.
All
flIes
allGcated
by the Editor are allcc~ted as temporary files so
tnat tn0y are deleted wnen clos~d.

56

HEP OPERATING SYSTEM
Wnen
tne
user
saves an edit,
the original file is
deleted
if necessary and the final output file is renamed to
the desired
name,
making
it a permanent rather
than a
tempcrary file.
When a reccrd file is editted, it is initially copied to
a temporary word file. Line numbers are assign~d unless the
record
file contains embedded sequence numbers at the end of
each logical record. Embedded sequence numbers are identified
by the
high-order bit being on in th~ first byte of the
8-byte number. If present, the embedded sequence numbers are
extrctcted
and used as the line numbers as the file is copied
to a ward file. The sequence numbers in the text are replaced
by blanks in toe word file.
1.7.4

Ru~ning

a Job From the Editor.

Wnen the submit command is used to cause a file which is
jcb stream to· be submitted as a job, the Editor builds and
sends a command
to
the
Reader task. The Editor uses the
message buffer
for terminal output and builds all fi~lds of
the me3sage directly.
Tne message text consists of a uro
(either
sup~lied
in the ·submit command or taken from the
user's
log-en)
and a file name. Ihe Editor does the trap to
send
tne message,
then does a trap to obtain a new message
buffer.
This new message buffer becomes the terminal output
buffer.
a

Wnen
a
jcb submitted
by an Editor h8s completed
execution,
a completion message is received
by th~ same
Erlitor
from
the Batch Monitor task. Informative m~ssRRes of
tni3
~O!·t
are distinguished
frem
user
commnnds by the
presence of ~ backslasn (line cancel character) as the first
cn~racter of the message.
Tnese messages are simply di~played
en tne terminal.

57

HEP OPERATING SYSTEM
1.8

Batch Monitor
1.8.1

Overview

The Batch Monitor runs as a task under the Executive. It
is responsible for job scheduling, resource management, and
precessing status changes for jobs in execution. The Batch
Monitor receives job descriptor messages from the Reader task
and maintains a queu~ of jobs to be run. As resources are
available, the Batch Monitor removes jobs from the queue and
initiates execution; a queue of jobs in execution is also
maintained. At job step termin8tion, the Batch Monitor
initiates the dump function if requested. The Batch Monitor
sen~s
cc~pleted
jobs to the Writer task for printing.
Operator commands are available to examine the queues,
r0.-order the' job queue, suspend or cancel jobs, and change
HEP partition sizes. The operator can also instruct the Batch
~onitor
to quiesce the system by shutting down the Reader
task and not starting any new jobs.
1.~.2

Commands

The Batch Monitor is accessible only from the operator's
console, directed by commands in the form of mes~ages
pre f n c e d b Y t [3 ivJ : ' (t h eta skI D for the Bat c h M0 nit 0 r). Th ere
are
two
categories
of
commands:
job-related
and
system-related.
In the following command descriptions the syntax of each
i~
given. Capital letters in commnnd mnemonics
represent the minimum portion of the word to be supplied for
command recognition.

comman~

1.R.2.1

Job-RelatAd Commands

In
the
following
syntax
descriptions 'nnnn'
represents a four-digit system-assigned job number which
uniqu~l.y identifies the jeb.
1.8.2.1.1

Move Job to Top of Queue

Next nonn
Job number nnnn is movc~ to the top of the
job qu~ue so that it will be th~ next job
started.

HEP OPERATING SYSTEM
1.8.2.1.2

Suspend Job Execution

SUspend nnnn
If job number nnnn is in execution, the
Batch Monitor sends a suspend message to each
task in the job Which is currently active.
1.8.2.1.3

Resume Job Execution

Resume nnnn
If job number nnnn is in execution, the
Batch Monitor sends a resume messag~ to each
task which is currently paused.
1 • 8 • 2 • 1 • II

Can c e 1 a Job

CAncel nnnn
If job nnnn is in execution, the Batch
Monitor s~nds a cancel message to each task in
the job. If job nnnn is in the job queue, it is
removed so that it will not be executed.
1.8.2.2

System-Related Commands
1.g.2.2.1

Set HEP Partition Sizes

Partition p,m,s1,s2,s3 ...
The
Batch Monitor sends a message to the
Kernel in PEM number p requesting that memory
type m be partitioned Rccording to the sizes
s1, 52, etc. The number of sizes specified must
be less than or equal to the maximum number of
partitions allowed in the memory type. The sum
of all the sizes ~ust be less than or equnl to
th~
physical nmcunt of th~ specificrl memory on
the
specified
PE~.
Partitions
may
be
reconfigured while jobs are runninB as long ns
the boundnric5 of the 8ctive partitions are not
c.lff(~cterl.
T.f th~ rcqucst~d p:1rtitionin~ cClnnct
be performed b~cause of viclntion of nny of tha
abov~
criteria, the partitions meS5~~e is
mcrlificd
to
reflect
the
actuql current
p8rtition sizes. In ~ny c~se, the meSSH~n is
r':turnerj
to t~(') B.1tch M',jn iter and is then
displayed i~ tabular format.

59

HEP OPERATING SYSTEM

If the operator simply wants to know what
the current partition sizes are, an easy method
is to type a set partitions command with a
single size field which is larger than the
total amount of memory of that type.

1.8.2.2.2

Set Control Card Proce'ssor

CC [uid]file name
Control Card Processor is always
The
loaded from a file. If the user wish~s to
specify some file other than the system default
(i.e. to tryout a new Control Card Processor
program), this command must be used to direct
the Batch Monitor to use the desired file for
loading th~ Control Card Proc~ssor task. The
named file remains the Control Card Processor
file until the Batch Monitor receives another
CC command.

1.8.2.2.3

Display the Job Queue

Display Queue
The Batch Monitor lists on the operator's
console all jobs waiting to be run, showing the
job number, name, memory requirements, and
process count requirements.
1.~.2.2.4

Displny the Jobs in Execution

Display I\ctiv(}
The Batch ~onitor lists on the operator's
console all jobs in execution, sho~ing the job
number, name, data m'2ffiory partition number,. and
the PEM numb~r, tnsk number, pnrtition numbers,
process count, and task status for each task in
the job. Tnsk status can be 'L' for loading,
'1\'
for active (running), 'P' for paused, or
'0' for dormant (no code in this task).

60

HEP OPERATING

1.8.2.2.5

SYSTE~

Quiesce the System

STOp
The Batch Monitor does not start any more
jobs from the job queue, and sends a ~essage to
the Reader to stop reading job streams. Other
Batch Monitor activities proceed normally.

1.8.2.2.6

Resume Normal System Operation

STArt
This command is the reverse of STOP; the
Batch Monitor sends a message to th~ Reader to
continue reading jobs, and the Batch Monitor
resumes initiation of jobs from the job queue ...

1.8.3

Inter-task Messages

In addition to commands from the operator's console, the
8atch Monitor receives (and sends) other types of messages.
These messages support three basic Batch Monitor activities:
sending and receiving HEP messages, sending and receiving
jobs, und t~king dumps of jobs.

1.3.3.1

HE? Messages

When the HEP sends a status change message on behalf
some job, the Batch Honitor receives a "switch
mess;)ge"
from the interface task.
A switch
message
con;, 1 ~.) t ~j 0 ron (~ II E P ~v 0 r rl 0 r d a t a, f 0 1 1 0 vi (~ d b y 32 bit S 0 f
control information. In this case, the HEP word contRins
the d;)tn memory arldrcss of the HE? message h~;:}dcr. The
83tch ~onitor then rearis the HE? message hen~er via the
low speed bus, sets good status in the header, and writes
the header back to data memory via the low speed bus. The
second word of the HE? message header contains the length
Clnd
stnrt address of the m0ssage dflta, if nny. If ther~
is d~ta,
the Batch Monitor rearls it via th~ low speed
bus, then releases the original switch message by sending
it b~ck to th~ interface tnsk 8S a reply.
of

The

Batch Monitor then processes th~ HEP message
to its type. The types of mt~ss:tgns that mi.ght
be
r~ceived
frem the HE? are pause, normal terrnin.:ltion,
~bncrmal
t0rminntion, ~nd system crrcr. The mcss(l~e
h e (l d :: r
c c n t :) ins ,
i n ,J rj d i tic 11
t (; m~ s S ·1 P.; e t y p ~, t h·? PE'4
acccrdin~

61

HEP OPERATING SYSTEM
number and task number· from which it came. Except in the
case of a system error message, the PEM and task number
are used to identify the job associated with the message,
by searching the execution queue. Since HEP mess~ges come
frc~ the supervisor task, 8 is subtracted from the header
task number to get the corresponding user task number. If
there is any ~essage data it is displayed on the op~rator
console and written to the job's log. file. If the message
was a normal or abnormal termination, the Batch Monitor
sends a canc~l to any other tasks in the job to force
them to terminate.
In

the case of
dlsplays the
console and halts.
~onitor

a system error message, the Batch
message data on the operator's

When the B~tch ~onitor wants to send a message to
the HEP, it must first seize control of the interface.
This is done by sending a a switch message to the
appropriate interface task (KI) with the target PEM
number in the first 16 bits of the data word. The
int~rface
task replies with the data memory address of
the interface area in·the switch message data word. The
third and fourth words of the interface area are where
HEP~bound
message henders are written. The Batch Monitor
writes its message header into this area Rnd sends an
~ctivate type switch message.

62

HEP OPERATING SYSTEM
OF BATCH MONITOR CONSOLE

SU~MARY

CO~MANDS

Jcb Related Commands

Next nnnn

- Move job number nnnn to top of job

queu~.

SUspend nnnn

If

REsume nnnn

If nnnn is suspended, resume execution of its
tasks.

CAncel

IF

System

R'~

nnnn is in execution,
the job.

nnnn
tasks.

nn~~

is

in

suspe~d

all tasks in

execution, cancel all of its

loted Command s

Partition p,m,S1,S2,S3 ••. S7 Set partitions in processor p, memory type m
to the value$ in 31 ••• S7.
CC[uid]Filena~e

- Set the name of the CONTROL CARD PROCESSOR
load module equal to [uid] filename.

Display

- Display the contents
waiting to be run).

QU';U0

of the Job Queue (jobs

Display Active

- Display the status of all active jobs.

STOp

- Do net process any more new jobs.

STArt

- Reverse of STOP, allow Batch Monitor
Reader to continue processing new jobs.

Oth~r

and

Console Commands

RD:[uid1FilenQme - Read the jobfile specified and
execution.

sub~it

it for

PR:[ui~l]Filename

- Enter the file specifip.d in the print queue.

PR:CI\nccl nnnn

- Remove job nnnn from the print queue.

P B : Cf\ n (~ r~ 1

- Step printin~
printed.

PR:COntiY"JU0

only

R0sum~
printing
0ff-line for some

63

0f

(aft~r
r~t1~0n).

f1

l(~

currs-ntly b0.ing

print~r

h~s

gene

HEP OPERATING SYSTEM

HE? DEBUGGER - HD:
Examine/Modify Memory [J[,Endaddr.][,Pn]
~1emtype

=

Pn

:: Processor Number

[/]
[::Valuc]

Default:: D

R, C, P, D or S

Default:: PO

I :: Optional Output to 
':: Value'

TAPE MANAGER -

:: Modify Word to Value

Specified

~T:

I H'''';

- Rewind tape.

lAP

- Append.

IFFn

- Forward

fil~,

n file marks. 'n' default:: 1.

:: <[uid]Filename> - Write <[uid]Filcname) to tape.
Default [uid] :: lC1st
[uid] encountered

or

[001001] •

<[uid]Filename>::

Copy <[uid]Filename> from tape.
Default [uid]:: last [uid] encountered

or

[001001J.

= [uid]

- Write UFD dump fer [uid] to tape.

[uid] =

- Copy UFD dump fre:n tape to [uid].

Tape M3na~er directives may appear in any order in a command
line, except that only one '::' m~y appenr. This must be either at
th~
frent of the ccmmand line (for writing to a tape) or at the
end of the command lin~ (fer reading from a tapq).

64

HEP OPERATING

SYSTE~

EDITOR - ED:
Editor commands related to file manipulation and batch
processing of jobs. Operator must be logged on to the Editor.

BYE

- Log off the Editor.

CF F 1 ,F2

- Copy file Fl to file F2.

OF Fl ,

- Delete files specified. More than one file
may be named en a command line.

BEL N 1

- Log on the Editor with userccde Nl.

LD

- List file directory 'for your usercode.

LF F1

- List the contents of File Fl.

RF F 1 ,F2

- Change the name of File Fl to F2.

~

?

trom it F1

- Submit the (Control Card) File Fl as a job.
- Print complete summary of Editor commands.

65 .

HEP OPERATING

SY3TE~

NOTE: Cut out this '15' and tape it as a subscript on page 2
under HEP DE8UGGSR section, the line "f: Value' : Modify word
t (, val u e x x s p e c i fie d rr \-111 ere the x x 's 3 r e .
ALSO, drnw 3 bracket on the left hand side between ,Pn] and
[/] in the third line ul1der HE? DEBUGGER and on the
right hand side after [/J.

HEP OPERATING SYSTEM
1.11 DisK Builder

The Disk Bui11p.r is a utility task used to initialize and
reconfigure the disk file system. It is not normally part of an
operational system system, but is always part·of the bootable
system on 8 distributio~ tape. The Disk Builder is unique in that
it accesses the disk directly, rather than through th~ File
Manager. The Disk Builder contains no co~mand error checking of
any description, and errors or misuse of its commands may destroy
the file system. The File Man~ger in a system must be shut down
while the Disk Builder is used. Disk Builder commands are
described betcw. ~ll commands are single letters.
1.11.1

Format Disk

The F command causes the disk to be formatted and
verified. Sectors with read errors are flagged.

1.11.2

Initialize Disk

The I command causes the disk allocation bitmap, the
master file directory and the user file directory for user
000 000 000 000 to be built. This re~dies the disk for use by
th0 Pi Ie ~'1:)nagcr
1.11.3

Crp.ate User File Directory

The U command prompts for n user ID, and cr~ates a UFD
fer this user. No check is made for duplicate UFD's.
1 • 1 1 • Lt

Log 0 n

Th~
L comm~nd prompts for R user ID, nnd
for 811 subsequent file references.

1.11.5

us~s

that 1D

8uild Bootstrap Sectors

8 ccm~nnd builrts the bootstrnp sectors (cylinrler 0,
sectors 0 and 1). S~ctor 0 contains a hardware
beotstr~p
for t~2 ROOT, while sector 1 contains pointers to
the
MFD, th~ bitmap ~nd the disk ad1ress~s and boot
p~r8~etcrs
fer the scparatp.ly ccmpilerl Executivp. tasks.
S0~tcr 1 is u3cd by Root initinliznticn to loarl th0 Executive
tasks.
Th ~ f3 (!ornrnnn~i cbtains the S·~ctor f) bcctstr()p frem the
file "H',.JBO')T.TSK" in the curr~nt U$~r to. Th~ comrn:1nd prcmpts
fer a s i~ r i I'} S 0 f t:) skI D's ;-) n d boo t p ·1 ram ~ t p r s. For e (J c h t n s '< ,
t :1': f clio win ~ b (; (; t P 3 r 8 met e r S m~ s t b .; SUP? 1 i ~~ d :
Th0

track 0,

66

HEP OPERATING SYSTEM
Filename

-

na~e
of an existing file in the current
UFD or
taskid, where taskid is a previously
defined task. If
taskid is entered, the
bootstrap entry is flagged so th~t the code
for taskid will be shared with this task and
not loaded again.
.
Th~

A

A

Debug Mode - If debug mode is Y, the initial flags of the
'task will offset so that the task will not
automatically
start
when the system is
boated.
If
the· bootstrap
sector
already
contains boot
information, the user is prompted for each ~xisting entry to
determine wh~ther to change that entry. After all existing
entries are processed, new entries may be added. Note that
since the boat sectors contain absolute disk addresses rather
than file names, it is necessary to rebuild the boot sectors
whenever an Executive task or the Root is changed.
Set Date

1.11.6

The D command prints the current date (M~/DD/YY) fro~
the calend3r cleck and accA.pts a new date. Typing nn invalid
rlnte will hang the task and require a reload.
Set Time

1.11.7

T command displays the current time from the
clack (HHMM:SS) and accepts n new time (HYMM). If an
invalid time is is entered, th':? tClS\< wi 11 hang nnri thf! syst~m
must be reloaded.
Th~

c~lend~r

1.11.3

M~~c

Distribution Tnpe

The M command will write a magnetic tape consisting of
the tape bootstrap contained in the file "MTBOOT.T3K",
followed by a cere image of the curr~nt incore syste~. this
t3p~
mClY
be hardvJarp, booted. For th~ tnpe to be useful, the
syst'=ln must be inactive vJhile the t3pe is being made, and the
File M~nager must be shut dawn.
1.11.9

R~ad

c c :n~n n n d 0 1 1. 0 'vi S t !1 ~ c per:) tor tor 0 a 1 dis 1< s ~ c t c r s •
prompts for the cyl inder h0;)d, and secter to b~
!\ f t e r
t h . .~
s ~ c tor is r.; r"j d, t h ~ com en () n rj prc:n p t s fer n n
mcdc, starting d~t~ word and word count tc print.

T!1 e

Thp
r c: :j ~j

Absolute Sector

R

cc:nm<1nd
•

cu~put

67

HEP OPERATING
Legal mcdes
(Octal).

o

SYSTE~

are A (ASCII), D (DBcimal), H (Hexadecimal) and

1.11.10 Set Indirect File
The
G command prompts for a file name and obtains
subsequent commands from that file until E()F or'error.

1.11.11 Shut Down

The
prep~r8tion

Z command
writes
out the current
for activation of the File Manager.

bitmap

in

1.11.12 Disk Build Procedure

This section describes the sequence of operations required to
build a disk from the distribution tape.
a)

Boot the distribution system from tape;

b)

Set the date and time;

c)

Format

d)

Initialize the disk;

e)

Define required UFD's, including

f)

Using the Executive Debugger, set the flags of the
task FM and MT to zero, allowing them to run;

g)

Using

th~

disk (if'required);

the

Tape

001001 from

th~

0010n1;

Mannger, copy the contents of UFD
distribution tnpe;

h)

Shut down the File Manager;

i\

Logon as 001 001;

j)

Use

k)

Shut down thG Disk Builder;

1)

Halt and reboot the system frcmdisk.

the
sectors;

Boct

command

to

initinlize

th~

bootstrap

HEP OPERATING SYSTEM
1.11 Di 3k Builder
Tne
DisK BuilJer is a utility task used to initialize and
reconfigure the disk file syst~m. It is net normally part of an
operational
system
system,
but is always part' of the boctable
sy~tem en a distribution tape. The Disk Builder is unique in that
it accesses the disk directly,
rather than through the File
M~nager.
The Disk Builder contains no command error checking of
any description, and erro~s or misuse of its commands may destroy
the
file
system. The File Manager in a system must be shut dcwn
while tne
Disk Builder is used.
Disk Builder commands are
described below. All commands are single letters.
1.11. t

Format Disk

formatted and
causes the disk to be
Tn e F command
verified. Sectors with read errers ~re f1 ag ged •
1.11.2

I:1itialize Disk

Tne
I command
causes, the disk allocation bitmap, the
master
file directory and the user file directory fer user
000 000 000 000 to be built. Tnis readies the disk for use by
tne File Manager'
1.11.

for

3

Gre~te

User Fi Ie Direotory

Tn~
U commc.lnd
prompts for ;;:j user ID. r:lnd crei1te~
tnis user. No cncck is made for riuplicF!te UFO's.

1.11.4

r.l

UFD

Logon

Tne L command
prompts for a user lD, and uses th9t 10
for all subsequent file referenoes.
1.11.5

Build Bootstrap Sectors

Tne
A command builds tne bootstrap sectors (cylinder 0,
track 0,
sectors 0 and 1).
Sector 0 oontains a hardwara
bootstrap for
th~ ROOT, while sector 1 contains pointers to
tne
MFD
the bitmap and
the disk addresses And
boot
parameters
for
the separately ~ompiled
Executive ta~ks.
Sector 1 is used by Root initialization to load the Executive
ta,ks.
Tne R command obt~ins the Sector 0 bGct,tr~p from the
f~le "ln/BOOT. TSK" in t,ne current u~er 10. Tne C'cmmnnri prompts
far n ~~ries of task IDt~ ~nd beot par~meter~. FQr A~cn task,
tnn fallowing boot parameters must be supplied:
t

58

HEP OPERATING SYSTEM
Filename

- The name of an existing file in the current
UFD or
ta~kid, where taskid is a previously
defined
task.
If
taskid
is entered, the
bootstrap entry is flagged so that the code
for
taskid will be shared with this task and
not leaded again.
A

A

If debug mode is Y, the initial flags·of the
task will offset so that the task will not
automatically
startwhen
the
system
is
booted.

Debug Mode -

If
the· bootstrap
sector
already
contains beat
information,
the user is prompted fer each existing entry to
determine
wnether
to change that entry. After all existing
entries are processed,new entries may be added. Note that
since the boot ~ectors contain absolute disk addresses rather
tha~
file names, it is necessary to rebuild the beot sectors
whenever an Executive task or the Root is changed.
1.11.6

Set Date

Toe

D command
prints the current date (MM/OD/YY) from
clock and accepts a new date. Typing an invalid
dnte will hang the task and require R reloRd.
the

calend~r

1.11.7

Set, Time

Toe
T command displays
the current time
from
the
calendar clock (HHMM:SS) and accepts a new time (HHMM). If an
invnlirl time is is entered, tne t~sk will hanR and toe system
must be relo~ded.
1.11.8

M(-)ke

Oi

strlbution T<.lpe

Toe M command
will write a magnetic tape consisting of
tape bootstrap contained
in
the
file
"MTBOOT.TSK",
follow~d
by a core imag~ cf the current incore system. ·This
t~p~
may be hardware b00tcd. For the tape to be useful, the
system must be innctive wolle the tape is being made, and the
File Manager mu~t be sout down.
toe

1. 1 1. 9

Rea d l\ b 3.-; I ute Sec tor

Tne
R command allow, th~ ope~ntor to rend disk sectors.
Tne command
prompts for the cylinder head, nnd sector to be
r e (J d •
Aft p. !~
t n~
,'3 e c t c. r
i 3 !' ~ ::l d, toe C f) mmAn ct p r () mp t 43 for n n
GU~put
mode,
3tart!n~
d,t3
word
and word count tc print.

59

HEP OPERATING SYSTEM
Legal modes
o (Octal).

are A (ASCII), 0 (Decimal), H (Hexadecimal) and

1.11.10 Set Indirect File
Tne @ command
prompts
for
a file name and obtains
subsequent commands from that file until EOF or error.
I • 1 1 • 1 1 S nut

Dc wn

The
Z command
writes
out the current
preparation for activaticn of the File Manager.
1.11.12 Di

sk Build

bitmap

in

Procedu~e

Tnis section describes the sequence of operations required to
build a disk from tne distribution tape.
a)

Beot tne distribution system from tape;

b)

Set the date and time;

c)

Format the disk (if required);

d)

Initialize the disk;

c)

Define required UFO's, including 001001;

f)

Using the
Executive
Debugger, set the flags of the
task FM and MI to zero, allowing tnem to run;

g)

Using
001001

the
Tape Manager, copy the contents of UFO
from the distribution tape;

n)

Shut down tne File Manager;

i)

Logon as 001 001;

j)

U.'3e
the
sectors;

k)

Snut down tne Disk Builder;

1)

I-! 3 1 t

;'1 !1

Beet

command

d reb c. (j t. t n e

8

60

to

initialize tne bootst.rap

y is t emf t" f) m dis k •

HEP OPERATING SYSTEM
2.

RESIDENT OPERATING SYSTEM

Tne !IEP (;crnputer contains four
different
types of memcry:
prcgram,
register,
constant,
and data.
Programs executing on the
mac n i n e a r e all 0 cat e d a "t ask" i n wn i c n tor un. Ea c.h "t ask d e fin e s a
contiguous region of eacn type of memory. The nardware ·restricts each
user to his own region of memory, and restricts the type of access he
m8Y make
to
eacn memory type.
Program memory is execute-only;
constant memory is read-only;
and
register
and
data memory are
read/write.

A
task may contain one or
several
processes.
which are
executable code sequences.
Several processes may be simultaneously
executing
in
tne
HEP, unlike conventional computers. Processes are
implemented by a set of hardware registers, of which there is a fixed
number;
thus an error condition (create fault) exists when too many
processes come into existence in
tne
processor.
Since existing
pr' cc e sse s
processes must be
can create new processes at will.
allocated
tasks and managed just as memory must be allocated and
to
ma!"laged.
All of tne sixteen hardware implemented tasks in tne HEP are not
equivalent.
Tasks
0-7 are user tasks. In these tasks. privileged
!nstructions are forbidden.
In tasks 8-15, privileged instructions
Fl r e a I 1 0 \01 e d .
Tn e s e t a s 1< s , calle d " sup e r vis.., r s" ,
per fer m s y s t em
~ervice3
for
tne user tasks. User tasks request these services with
"3uperv:!.sor call" (SVC)
inetructions. These instructions generate a
" t rap" , c !' eat i n g a p r c c e s s i n a sup e r v :;. so r
t ~ s k and sus pen din g
execution of tne user. The hardware forces user trRps to a p~rticular
~upervisf)r
tusk,
for example, task 2 traps to ta,'3k 10. In generrtl,
t~~k k(k<8) tr~p~ to task k+8.
~up~rvlsQrs may also generate trnp,. All traps from a sup~rvisor
create a precess in task 8. A supervisor trap suspends the supervisor
in
tne
same way a
u~er
trRp suspends the user. Note that a trap
suspends
ALL processes in a task, net just the process cau~ing the
trap.

Tn~
HEP computer is interfaced to I/O devices and the user via
Executive computer. In hardware, the Executive can read and write
HEP prcgra~
and data memory and certain centrol registers via a low
3peed
(actually quite nign speed) bus (LSn) :;'nterface. Pr:!.vI1eged
iD~truct~Gns
on
tn~
HEP can also manipulate certain of th~se
regi~ter3.
In addition,
the
Executive and the Re~ident OperatIng
Sy~tem
are
interfaced
vin tne
passive InterfRce,
wnich allow~
~ u P (.: r 'I i ~ 0 !~ Y pre c ~ S 3 e 3 t f) i n t e r' ;) c t wit n t n ~ E x e cut i v e. 0 n ~ 0 f t n ~ rn a 1 n
~ ~ per v i ~ () r~ y
f u !'"j C til) !'"j S
G f the HE P 0 /~: i s t I) C () n t r f~ 1 t n e flo \01 0 f rl <
I E

:-1SG
J
CODE STI\TUS
1 ~
G
F
2
THIS I\DR
~EXT l\OR
3
4 LEN • F I LE \J AME
5

D

I
UF01

c I

I

B

PRFV f\DR

I

{

MESS ~'\GE

UID
A

UF02

HEAD~R

,

}

6

(

7
8
~ECSIZE

9

1 ')

RECORD
HEADER

EOF WORD IFIlE
·F ILEN AME (BYTE SWA.PPED)
l\CPRIV

lENGT~

I

D.I\ T 1\

BUFFER

~I)

Figure C - OPEN/CLOSE FILE SYSTEM MESSAGE BLOCK

o
~ord

MESS(\GE
HEf\DER

STATUS
1 ~~~~~G~~~~F--~~~~~D~~~--~~--~~~
2 ~_______'~rf~·IT.~.S~A~D~R~____~~____~~~~~~~~~
j ~_______~~'lE~:X~T~~~D~R~____~____~~__~____~~~-v

0

R~CORO

HEADER

J.l

S

DATI\
DI\TI\

nUFFER

Figure 0 - READ/WRITE/OBTAIN FILE

SYSTE~

MESSAGE BLOCK

n

~ord 0l~~~~~~~~~~~~~~§U~IgD~(~R~E~T~U~R~N~E:D:)~~~.
J2

__________ USE!L-Ill

1?

RYTES

MESSAGE
Ht::ADER
RECORD

HEADER

3
4

Fi

~ u r:~

F. - LOG 0 H F I L E S YST ~ '·1 !·1 c: SS r\ GE

22

HEP

OPER~TING

SYSTE~

CLOSELU - SVC 1
CLOSE SVC
acquires an LU environment from the'
LUTABLE. If the entry in the LUTABLE indicates that the
file is not open error status will be returned to the
user. ~fter it determines that the LU is open, CLOSE SVC
will compare the options word which has been saved from
the open with the options word sent in'the CLOSE SVC
parameter block. Changes indicated will be copied into
the close message. If the file has been opened with write
access the current record will be written and the EOF
pointer will be updated. If the rename bit in the ACCPRIV
field is on, and a file name is provided, this name will
be copied- (byte swapped for the PDP-11) into the message
block. Finally a CLOSE message will be sent to the file
manager .. The LU environment is then returned and the
LUTABLE entry marked not open. Status returned by the
file system is returned in the SVC parameter block. The
user process is re-created and the local registers are
returned by the supervisor. Figure C shows the format of
the close message to the file manager.
BUFFERIN - SVC 2/BUFFERQUT - SVC 3
BUFFERIN and BUFFEROUT perform the read and write
operations respectively to disk files. Except for the
direction of the 1/0 they are essentially identical.
BUFFERIN/OUT ~cquires an LU environ~ent from the LUTABLE.
If the LUTABLE indicates the LU is not open an error
status is returned to the user. EOF condition is chp.cked
for both operations, and if tru8, EOF st~tus is r~turncd,
0xcCpt where extend and write ncccss hns be~n gr~nted on
the open of th~ file. Dato is copied to/from the LU
Buff~r and user Dnta Memory, one worrl nt a time until the
logical record length specifi~d has been consumed. When a
10gic81 record crosses the boundary of a physical record
a physical 1/0 is performed. In the case of BUFFERIN this
is just a read. In the case of BUFFEROUT, if the cur~ent
physical record is not the last r~cord of the file the
current record is written and the next record read into
the buffer. If the current record is the last record in
the file an OBT~IN ~essa~e is sent to the file system
processor to acquir~ the address of the next record, and
have it assigned to this file. This arldrQs~ is copied
into th~ next address fielrl of the current rp.cord header,
and the record is written.

23

HE?

O?ER~TING

SYSTE~

Upon completion of the 1/0 the LUTABLE entry is
marked available, status is placed in the parameter
block, the user process is recreated, and the superviso~
returns the local registers. Figure D shows the format of
the Read, Write and Obtain messages to the file manager.
BACKSP~CE

- SVC 4/REWIND - SVC 5

BACKSPACE and REWIND each acquire an LU Buffer. As
with BUFFERIN and BUFFEROUT, if the LUTABLE indicates the
LU is not open error status is returned.
BACKSPACE/REWIND
must check the current access
privileges. If write access is included,- the current
record must be written, in case it has been modified. For
BACKSPACE the current position pointer is decremented by
the logical record length. If it is decremented beyond
the beginning of the current logicRl record, as many
reads in reverse direction as necessary are performed
un~il the position pointer is in the current buffer.
For REWIND the operation consists of simply reading
the first record of .the file and setting the position
pointer at the beginning.
Error status could be returned if an 1/0 error were
to occur of if an attempt is made to BACKSPACE beyond the
beginning of the file.
Status is returned in the SVC oarameter block. The
Buffer
is
returned, the LU~A8LE entry marked
available,
the user process recre~ted nnd the supervisor
local registers returned.

LU

ENDFILE - SVC 6
ENDFILE, in this implementation, has the effect of a
call to CLOSELU with the default options specifi~d.

STOP - SVC 7
STOP
obtain a

does not acquire an LU Buffer, it do~s not
local regist~r environ~cnt and the user is not
i~medi8t~ly
r~-nctivatcd.
When the 1/0 s1tpervisor i~
enterAd
for a STOP SVC the user h~~ already b~en
d0-activate~
as a result of issuing the SVC. The
supervisor verifi~~ the address of the ~essage text in
the parameter block. It iSSU3S n KILL follow~d by an

24

HEP OPERATING SYSTEM
ACTivate instruction against the user task to ~ake
certain that the user task has no outstanding SFU
requests. It then issues a call to CLOSEALL, which closes
all open LU's. Finally, the supervisor issues a STOP SVC
to the Kernel with a pointer to th~ message passed by the
User. The STOP SVC to the Kernel is not the same as a
user STOP SVC, a supervisor STOP request is SVC O.
PJ\USE - SVC 8
As with STOP, PAUSE does not acquire an LU Buffer,
nor a local register environment, and the user is not
re-activated. The user is already dormant, therefore
PAUSE simply verifies the address of the text passed by
the user in the para~eter block, and issues a PAUSE SVC
to the Kernel with a pointer to the same text string. A
supervisor PAUSE request is SVC 1.
INQUIRE - SVC 9
INQUIRE acquires an LU Buffer. If it is found to be
new buffer, i.e. the LU in question is not open, the
supervisor returns a .non-zero status. If the buffer is
~ot a new buffer then the LU has already been opened, and
the supervisor returns zero status, and the record length
and
options word in the pnr~meter block. The purpose of
INQUIRE is to allow a user to ask the supervisor if an LU
is open before attempting to do 110, open or close it.
The LU ~ould have been opened by the Control Card
Processor, or by C3nother tas\< \..rithin it!=; own job (in a
multi-PE~ environment).
a

GSTENV - SVC 10
A GETENVIRONMENT call is executable only by the
Control Cnrd Processor. For any other user an illegal SVC
ABTERM will res~lt. GET ENV does not require a local
register environment, and does not obtain an LU Buffer.
The supervisor Simply decrements the user's D~ta Me~ory
limit by the length of nn LU environment and rewrites its
TS't! .

LOGON - SVC 11
LOGOH acquirp.s an LUBUFFER nnd a sn.t of loc~l
registers. Even though it is not n~soci3ted with an LU,
LOG () N r e qui r ~ s 3 0 :] t ;) r·1 e m0 r y ''''/ 0 r k a r P.:'. Tnor rl e r to
rn a in t

~J

i nth 0

r

p. -

en t ron t

25

n;:) t u r

C

0

f

t h ~ I//) s u p\~ r v i so r

i t

HEP OPERATING SYSTEM
must acquire this environment for the LUTABLE. For this
reason
there must be at least one LU environment
available at the time a LOGON SVC is issued. The Control
Cnrd Processor issuei a GETENV SVC (SVC 10) before it
issues a LOGON. If a user finds it necessary to LOGON
using a user ID other than the one us~d to open the
jobfile, he must ensure that a buffer is available.
LOGON copies the twelve character user ID specified
in the SVC parameter block, and issues a LOGON message to
the file manager. If the file manager accepts this ID it
will return the UIC code. This code will be used for all
successive opens from this task until a new user ID is
supplied.- Files already opened under another UIC will
remain under that urc. If the LOGON is rejActed by th~
file manager the error status will be copied into the SVC
parameter
block. The LU Buffer and local register
environ~ent
are returned, and the user re-created.
Figure E shows the format for a LOGON message to the file
manager.

GETCORE - SVC 12
GETCORE
does
not
require
a
local register
environment or LU Buffer. It does not return status. If
the pointer to the SVC parameter block contained in the
user's indexed register one (R1:I) is not a valid address
the supervisor will issue ·an ABTERM. Otherwise, the
nddress of one greater than the last word of user Data
~~mory will be returned in the SVC parameter block.

26

HEP
2.4

Error

OPERATI~G

SY~TEM

H~~dler

Hardware-d~tected
error conditions result in traps to a
set of low-core addresses. All such errors in user tasks are
processed by the User Error Handler, which is n Supervisor
process running in the corresponding task (User Task Number
+8). When the hardware detects an error condition the task is
made dorllant. The first act of the supervisor is to issue a
KILL instruction followed by an ACTivate on the user task.
This
will insure that all processes in the tas~ are
t~rminated.
Then the supervisor will call an 1/0 Supervisor
CLOSEALL to insure tha~ all opened files are closed. The
Supervisor then builds an abnormal termination (ABTER~)
message which consists of three words containing:

a)

Trap PSW;

b)

User PSW at time of error;

c)

Instruction generating the trap.

This message is sent to tbe Kernel, ann is normally printed
on th~ System Console by the Batch Monitor.
When a Cancel Task message is sent from the Host, the
creates a process in th~ user task with all bits on
except t~~ PS field. It is th~n treated as any other ABTER~.

Ker~el

When the Kernel r~ceives a Suspend Task messag0 from the
Host, it cr~~tcs a process in the user tnsk at loc3tion zero,
with all UTM bits on. This is a specinl case in which the
Supervisor simply vectors the PSW which trapped to the quit
3t instruction zero, and issues a Pause request m~ssnge with
no text to the Kernel.
The User Error Handler shares the global supp.rvisor
regi'5ters and data memory with the I/O Supervisor. It ~ust
th~refore
observe th~ sam~ s8maphori~g conventions on those
rr:s()ur'ces in order to avoid conflicts.

27

HEP

3.

SYSTE~

3.1

OP~R~TTNG

SYST~~

SOFTWARE

Control Card Processor Overview

HEP Control Card Processor eCC?) is a system program which
processes
certain
records in the user job file. CCP is
responsible for allocating and opening all disk files for the
user Partition as a result of submitting a job. After processing
the r e cor d s i n . the Job F i 1 e, CCPt e rm ina t e s, lea vi n gall f i 1 e s
open, with th~ user load file assigned to LU zero.
CCP

encounters an error in the Job File, such as an
com~and
or not being able to open a file with the
r~quested
privileges, all open files will be closed, and the Job
will be terminated.
If
illegal

All

CCP commands must begin in column one
stated, must be followed by at least
Commands recognized by CCP are:'

oth~rwise

JOB - Job Specification
ASN D~P

and unless
one blank.

R~cord

File Allocation and Assignment Record

- Conditional Dump Record

R'J II -

Run Re ~ 0 r d -

Sp e c i

fie s L 0 .1 d F i 1 e :) n d

Fl n dEn rl

0

f ,J 0 b

Step
II
t

*

t

End of

Job

Record -

Termin~tes

- Any Record
Treated as a Comment
COlOm.~nt

1

All

Beginning

Job

With

Steps·
an

,*,

is

HEP OPERATING SYSTEM
3.1.1

Control Card Processor Command Syntax
following commands are accepted by CCP. Even though
may b~ recognized by the READER, by the time
receives access to the Job File they should be commented

The
oth~r

CCP
out.

com~ands

3.1.1."

Job Record Syntax

JOB
This record is copied into Logfile with no further
processing required by CCP. The first record in a Jobfile
must be a Job Record.
3.1.1.2

Assign Command Syntax

ASN LU,FILENAME[,Logical Reclen, Accpriv, Owners Accpriv,
Public
Accpriv,
1/0
Direction, File
History, File Disposition, Buffer Count]
[1 -

Indicates optional
order dependent.

Example:
Accpriv

parameters,

not

4SN 5,CARDFILE,REC:80,ER,F,OLD,
KEEP:DgLETE

- A single letter for each access privilege, may
be specified in any order.

Pr8fix 0

- Indicates Owners PrivileBes

Prefix P

- Indicates Public Privilgcs

No Prefix - Privileges For This Open
R - Read

Acc~ss

W - 'tlr i te Access

x-

Extend Access

E - Exclusive Access

s -

S~mnphorQ~

D -

Delet~/R~name

Access (I'llpl0.mcntcd in H3FS 0:11y)

2

Access

HEP OPERATING

SYSTE~

If file is being newly created, 0 and P Accprivs become
the permanent attributes of the file.
If file

alre~dy

exists, 0 and P Accprivs are ignored.

DEFAULT - (No Accpriv Specified)
For this open - R - read access
For owner if creating file - WXED
Write, Extend, Exclusive, Delete/Rename
For public if creating file - No privileges

liD Directlon - A Single Letter
F - Forward

- Open

at

forw~rd

beginning of file, do I/O in
direction

8 - Backward - Open at end of file, do I/O in forward

direction (implemented in HSFS only).

A-

- Open at end of file, do I/O in forward
direction (X - Extend Access must be
allowed for appending).

~ppend

DEFAULT is F

I/O.

Forw~rrl

File History IJ3E

-

Usc

old

file if

pr~3~nt,

cl~e

~r~8te

n0W

file

if

file.
~EW

- Create
new
present.

OLD

- Use old file, fail if not present.

CRS~TE

- Create

n0W

fil~,

delete

olrl

file, fail if old file prescnt.

DEFAULT - (No history specified Rt all) is USE.

3

HEP OPERATING

SYSTE~

File Disposition DELETE

~

Delete on any close.

KEEP

-

~eep

on any close.

DELETE:KEEP - Delete on norm~l (user) close Retain on abnormal (system) clos~.
KEEP:DELETE - Keep on normal (user) close Delete on abnormal (system) close
DEFAULT

Logical

- (No 0isposition specified) is:
If old file used, KEEP on any close If newly created file, DELETE on any
close.
-

R~clen

REC:n or n
Where n
words.

=

Desired

logical

record

lenqth

in

HEP

If fil~ is being created, n becomes the default
RECLEN for the file and if n = 0, or is not
specified, a word file is assumert.
If file already exists If n = 0 it is treated a~ 8 word file for this open.
If n is not specified the default RECLEN for the
file is used.

4

HE? OPERATING

SYSTE~

Buffer Count of buffers allocated in HEP Data Memory for
this open of this file (implemented in HSFS only).

Nu~ber

BUF:m
Where m - Number of Buffers Desired.
DEFAULT is 2 Buffers.
(NOTE: In
standard filp. system impl~mentations
Bufe'er Count defnul ts to one, even if BUF is
specified in a Control Card.)

3.1.1.3

Conditional Dump Command Syntax

D!1P [ AL HAY S ] [ U'1 Er-1 0 RY T YP:: S ) ]

- Specifies dump after any termination.
Default
is
dump
after
abnormal
termination.
(ME~ORY

TYPES) - P - Program
R - R~gister
C - Constant
D -

Oat::}

types to be dumped, enclosed in
parenthesis.
D~fault
is (RO) Register and Dnta
Memory dump.
Memory type ch8ract~rs m8Y be in any
or~er,
and should not be separated by
any other characters.
M~~ory

ExamplG:
th) D14P

Recorrl

- No dump

Hi

11

be taken.

[) t·1 P !\ L~rJ '\ YS (P) - 1\ ftc rAn y t ~ r TTl i t1 rt t ion
~1emor y is dum perl .

J

Pro ~ r nrn

Ot1 P (C RD)

- After abterm, Constant, Regist~r
and Data ~~mory are dumpad.

D'1P

-

Aft~r
~1 t: Tn 0

5

ry

~btGrm,
3

r

.?

R~~ist~r

d IJ 11 P ~ ct •

Rnrl Datn

H£P OPERATING SYSTEM

3.1.1.4

Run Command Syntax

RUH[OPTIONAL RUN PARAMETERS]


- Name of user task to be run.

[OPTIONAL RUN PARAMETERS1 - Copied

as
ASCII text, left
justified
into
user
Data
Memory, beginning at word Q
relative to user Data Memory
base.

If optional run parameters are
included, the first ten words
of user Data Memory will be
initi~lized
to zero. Then the
text string will be copied,
be~inning
at
byt~ 0,
and
running to the end of the
input line.
SX8:nple:

and run
run parameters.

RU:I t·1YF ILE. TSK

- Load

RUiJ HEPT!\SK ABC D E F -

~Y~~LE.TSK,

no

Copy the string 'A ReD E r'
into
user
Data
~cmory
beRinning nt wor1 zero ~nd
blank filled to the th~ end of
the input lin-e. LOC1d Clnd run
HEPTJ\SK.

3.1 . 1 .5

End. of Job Record Syntax

II -or- En~ of File on Jobfil~.
Caus~s
clos~~rl.

3.1.1.6

termination

Comment

Any 'string

of

8

HEP job. Any open files are

Recor~

with an

bc~innin~

6

~stcrisk

('*') in

colu~n

.

HEP OPERATING SYSTEM
Tne
HEP Centrel Card Processor eCC?) is implemented in such a way
as tv make
it very easy fer
a user to add features to it, or if
de,lred.
wri~e
a new one.
Tne following
describes
the
Runtime
t. n vi!' I') n men t e x pee ted b y t n e CCP •

3. 1.2

Ru~time

Environment

CCP runs in tne User Partition just prior to the execution
of a User Task. In the case cf a multi-task job, CCP is loaded
in toe first partition large enough to hold it.
CCP

Ru~

Parameters

In
User
Data Memory
following information:

beginning

with

word 0 is the

User ID Code

-

12 Bytes, ASCII

Job Number

- 2 Bytes, Binary

Jobfile Record Number - 2 Bytes, Binary

o

REC #(0 indicates a dump has been taken.
The following

filenamin~

conventicns apply tl) CCP:

Jnnnn.HEP : Jobfile Name
Lnnnn.HEP : Logfile Name
Dnnnn.HEP

Dumpfile Name

x

Pnnnn.HE? : Dump Formatter Print Filename
\/ n ere 'n n n:1' : Job Nu mb e r'
f:!.ler.nrnes
All
cf
toe
abcve
fnhricCited using tne J()b Num~t:r p::l~'3ed to
run

p:.ir::lml=t(~r.

7

can
~CP

0 ~

be
n

HE? OPERATING SYSTEM
Jobfile Rec.crd Number (word 1, 4th quarter).
is the
number
of tne last record of the Jobfile
read by CCP fer the current job.
IF REC #=0

tnen
this
is
the
first step of
this
job.
Begin
p~ocessing from
the first record of Jobfile.

IF REC #)0

then this is not the first step of
this
job.
Begin
precessing from
REC # + 1 of Jobfile.

IF REC #(0

i.e. the high bit of this field is
set,
tnen
this
is not the first
step of this job, and furthermere,
a
dump nas been taken of the HEP
memQry_
CCP must Open the Dumpfile at LU1,
Open the
Dump print file at LU2,
and
Open
the Dump Formatter Lead
l~ 0 d u I e (D ~~ F ~1 T • HL L) a t L U0 •

Wnen
CCP terminates normally,
it passed a
binary
stop c~de via SVC 7 to th~ Batch Monitor,
of the form;
0r-____~7~8_'____________~63
I Dr, I
RF.:r, II
I
~~HERE

DC

=

Dump Cede -

Dump

No

Applies only to this Job Step.

Conditions -

Cede

Bits, 2,
0

Dump

3
0

0
16

Dump

C)

r. l\bterm

0

16

Dump on

Ne rm a 1

Term

0

2
1 (-

Dump

J\l\-J~y~

")

.>

1 ()

8

HEP

OPER~TtNG

~emory

SYSTE~

Type to be Dumped - Bits 4,5,6,7

Program Memory

1 0 0 0

3
16

Register

0 1 0 0

r~~mory

4
16

Constant

0 0 1 0

M~mory

2

16

Data Memory

0 0 0 1

1
16

Memory Dumped
bits, e.g.:

REC #

will·

be

X'1F'

- Dump all

X'35'

- Dump

X' 00'

-

the inclusive Or of these
me~ory

on abterm.

Register and Data Memory on
any termination.

No

= Number

dump.

of jobfile record last proc~ssed.
If en1 of file on the jobfile has b~en
encountered the numb~r returned is a zero.

9

HEP OPERATING SYSTEM
In processing LU assignment records
following sequence of Supervisor Calls:
1)

LOGON sve 11

- Log

on

the

ecp

must perform the

using the user ID in Data Memory bytes 0 -

11.

This
must be done once at th~ .b~ginning of
execution, before any files, including the Jobfile
are opened.
2)

INQUIRS sve 9 - Inquire regarding the status of an LU. If LU i.s
already opened, SVC 9 will return its current
default record length, and options. If t=ln LIJ is
open an attempt to open it again, whether for the
same file or not, will result in an error.

3)

SETENV SVC 10 - Get

an

LU buffer environment. This must be done
to opening a file. SVC 10 is allowed only to
cePe Once gotten, an LIJ buffer will not be
returned. If files are opened, and subsequently
closed before another is opened, an extra SVC 10 is
not required. The number of SVC 10's issued must be
greater than or equal to the number of LU's opan at
any time. SVC 10 will not return a status, if it
fails, the next open will be unsuccessful.
prior

4)

8PENLU SVC a
If

- Open a file at the specified logical unit.

program to b~ run is a FORTR4N program, or an Assembly
program which uses the FORTRAN 1/0 Formatter, it is necessary
OPEN nnd any Input or Output be don~ via calls to the T/0
:-or:n~ltter,
:1S
it m8int8ins
internal buff0rs for the opened Logical
Units.
R~fer to HEPFf1T documentation for a complet~ description of lID
~0rmntter routines.
th~

Lq~guage
th~t
the

10

HEP OPERATING
3.2

H~P

SYSTE~

Dump Formatter

HEP Dump Formatter is a system program which runs in a
user partition immediately following the execution of a job for
w~ich
a memory dump is taken. The purpose of the Dump Formatter
is to translate the binary dump file into a printable and more
legible format. The Dump Formatter is loaded by the Control Card
Processor at the instruction of the Batch Monitor, immediately
after th~ dump is taken. In the case of a multi-step job, if a
dump is taken it will be formatted before the next step in the
job is executed.
T~e

A typical dump will contain the UIC (User ID Code), job
number, jobfi le record number, job na!Tle, processor and task
numbers for each task in the user job, user and supervisor TSW's
fer each task, system table entries, user and supervisor PSW's
and the contents of the entire partition for each memory type
specified.
A us~r mAY request thnt a dump b~ taken ~ither after an
Abnormal Ter!Tlin1tion (A9TER~)" or aftp.r any termination of his
jeb. He may also specify which memory types arA to be dumped.
This is accomplished by the DM? command in the jobfile. Depending
on the information in the D~? command, the Batch Monitor
initiates a dump upon receiving a jeb complet~ message from 'the
K~rnel.
This binary dump will be output to a newly created file
with a n~m~ of 'Dnnnn.HEP', wh~re 'nnnn' is the job number. This
is a r~cord file with a 10Bical record l~n~th of 120 words. It
will ccnt~in one header record follow~d by one t~s~ record anrl
one PSW record fer each task. Then will CO!Tle th~ memory dump
records for the memory types specified, in the following order:
Dnt~
MAmcry, then Register Memory, Constant Memory and Program
Memory for the first task, followAd by the Register, Constant and
Prograrn ~~emcry for the second tas!<, and so on. Figure A contains
a dingram of the dump file record formats.

11

HEP OPERATING

o

SYSTE~

_ _ _ -YIC

1

2

~--------------

3

t..ford

__~~~~~__________________~ HEADER
RECORD

0
1
2

USER TS'N

3
l~

SUPERVISOR TSW

5

TASK
RECORD
( 1 PER
TASK)

6
1
8
9

TASK'S SYSTEM
TABLE ENTRIES

10
11

UNUSED

tAo rd

3 l t 10

a
1

USER

.

PSW
RECORD

PSW'S

() II

( 1 PER
TASK)

ALL SUPERVISOR

65

.

PS''']'S

1~3

37
',1crd

J

P

R

1
2

10

FAIRS

D!\TA
RF:CORDS
127
128

IJ l'IlJ~) F. D

Figur0 A - DU~PFILE RECORD FOR~AT~
Lcgical R~ccrd Length = 129 Words
12

HEP OPERATING SYSTEM

Th~

type.

Figure A - DUMPFlLE RECORD FORMATS
Logical R~cord Length = 129 Words
follcwing describes the processing necessary for

Header Record - Contains UlC, job number,
number and job name.

e~ch

job'. file

record

record

Task Records

- (1 per task) - Contain processor number, task
number, user TSW, supervisor TSW and system
table entries. The system table entries give
the starting address and length of the Data,
Register,
Constant
and
Program
Memory
partitions, and the maximum number of precesses
allowed for the task. The user TSW contains the
base and limit addresses for the user's memory
p8rtitions. Using this information a table of
supervisor base, user base, user limit and
supervisor limit is set up for each memory
type.
This table will be referred to in
processing th~ Data Records.

P3W Records

- (1 per tas~) - Contain all of the PSW's in the
PEr~
at th·~ time of the riump. Th,~ first 64 are
user PSW's; the last 64 are sup~rvisors. The
Dump ,Formatter
sc~ns
through
this record
comparing the PT field with the PT specified in
the Task Record. Those PSW's which belong to
the
task
in question are output to the
printfile.

D8ta R0ccrds

- Using the information in the first two words,
the absolute address of er.lch word in the record
is cnlculateo. This address is compared with
th~
base and limit Table entries for the
appropriate memory type to determine whether it
is
a sup'?rvisor or user, and wi t~in . the
p:1rtition. If th'~ end of th~ memory p3rtition
falls within a record buffer, the buffer is
fill~d
with JS m~ny worrls as nec~ssary beyonrt
the end of th~ partition.
In
a
D~ta
R0cord
the word immedi~tely
proceedin~ n mcmcry is its re~ister descriptor.
The following prcces~ing i~ ncc~ssnry for each
memory

typ~:

(~ce

1'3

Fi~ure

B)

HEP OPERATING SYSTEM
Register

Empty/full bit and reserved bits are
checker.i,
and
tE'/'F'
and 'R' are
printed,. The number representing dnta
quality
is
printed, and parity is
calculated. If the parity bit in the DQ
is not correct an '*' is printed.

Dnta

Empty/full bit is checke1, and 'E'/'F'
is prin~cd. The data quality number is
printed and parity is checked. If parity
is incorrect an ,*, is printed.

Constant

Parity 'is calculated. If the parity bit
is incorrect an ,*, is printed.

Program

The Register Descriptor field is ignored
for Progra~ Memory .

Finally, the• address, memory type, supervisor/user's status,
register descriptor field and memory contents are printed, four
words to a line. If the supervisor/us~r's status or memory type
is different from the previyus word, the current line is
terminated, and several lines skipped to dilineate the change. If
mere th~n two lines in a row would be identical except for the
address, the message ,**** THROUGH ****' is printed, ~nd all but
thA first and last lines are left unprinted.

)

I

PiE

I

R

I

,

L-.--y-:-

lJQ

P

= P:lrity Bit

E

= Empty

R

=

Bit

=

1 - Empty,

=

Reserved Bit

1 -

=0

- Full

Rcserveo

DQ = Bits 61=63 Represent D8ta Quality
Register Descriptor Word Forrnnt
Figure B

14

HEP OPERATING
3.4.2

SYSTE~

HEP 1/0 Formatter

The HEP 1/0 Formatter is a set of system subroutines
which is included in the user Load ~odule. It provides an
interfaoe between the FORTRAN program and the 1/0 Supervisor.
The lID Formatter is responsible for perfor~ing formatted and
unformatted
I/O,
opening
and
closing logical units,
backsp3ce, rewind and endfile, and issuing STOP and P~USE
requests. It is primarily record and logical unit oriented.
If 3 user wishes to write an Assembly Language program which
utilizes the 1/0 Formatter, it must be done in the same
man~er
as a FORTRAN program. The following describes the
interface between the user program (FORTRAN or Assembler) and
the 1/0 Formatter.
OPEN and CLOSE are called using the standard HEP FORTRAN
calling sequence, with para~eters as follows:
CALL OPEN (LU #, Filena~e, Logical Record Length,
Options Word)
CALL CLOSE (LU N, filen3me, Logical Record Length,
Options Word)
Parameter blocks for all oth~r 1/0 Formatter routines
have sp~cial formats (See Figure B). In all cases, as with
any FORTRAN subroutine, indexed register zero (Rn:T) contains
a point~r to the user's D~ta Memory Onse, injexed regi~ter
one (R1:I), a pointer to the parameter block, and th~ low 32
bits of indBxed register two (R2:I) contain the rAt urn PC.
The word immediately follo\tJing the parameter block must
contain 3 -1. This is beeause OPEN and CLOSE ~ay be called
with a variable number of parameters, and the end of a
parameter block is designated by a -1.

(.

HEP OPERATING SYSTEM

.

"

.

..

I

'i' FOR\1/\T

I U NU;·1B~R

I

PC

END=RETUR~I

pr;

ERR=R~TURN

n

F~TOLST

LENGTH

0
I
-1 (ARRA.Y ELE~~ENTS )1

LU NI.Pv1BFR
l' T 10 TTEl'v1
0

I

"'%STOPI

o

LIJ NUMBER

o
o

F%8SP~C/F%RWTND/F%WEn~

o

I

TE:il
t I."

Pnr~m~ter

2

)

HEP

OPERATI~G

~YSTEM

I/O Formatter Entry Points
(R~fer to Figure B for parameter block formats.)
OPEN/CLOSE
OPEN acquires an LU Buffer, 'and i~sues an
SVC 0, to open the file specified, at the LU
specified. If a record length is not specified (i.e.
the third parameter negative) th~ default record
length for the file is used. If record length is
zero the file is treated as a word file. Any other
reco~d
length supplied is considered the record
length for this open. W~RNING: Attempts at formatted
I/O on a word file may have unpredictable side
effects. The I/O Formatter is record oriented.
CLOSE frees the LU Buffer, and issues an SVC 1
to close the file specified. If a filename parameter
is specified it will attempt to rename the file, and
if record length or options word parameters are
included, these will also b~ copied into th~ SVC
parameter block. Ciose may be called with only an LU
~umber parameter if desired.
.
A user may open and/or allocat~ a file by na~e,
close or delete or ren~me A file using th~ OPEN
CLOSE subroutines in the I/O Formatter. These
~ctivities
ar~ accomplished by means of the Options
Word par~~eter. This word is copied directly into
th~
SVC parameter block by the subroutin~. It is
divided into sevcr81 one byte fields which have the
following meanings:
and
and

A-

R~quested

Access Privilegp.s For This Open

B - Public Access Privileges

C - Owners Access Privileges

D - History
E - Disposition
F -

IIO Direction

G -

Buffer Count

3

HE? OPERATING

SYSTE~

Access Privileges - Fields A, B, and C
If
the file is being created (op~n) the
privileges requested in these fields become part of
the permanent attributes of the file. On a close, if
the high bit of each field is set,'th~se become the
n~w attributes of the file.
Bit Definitions
••••••• 1

Read Access .

•••••• 1.

Write Access - Update Records .

••••• 1 ••

Extend Access - Add Records .

•••• 1 •••

Exclusive Access - No Other Concurrent
Opens 'Allowed.

* ... 1 ••••

Semaphored Access - May Consume and
Fill Records .

. • 1. • • . •

Rename/Delete I\CCp.ss •

• 1 ••••••

Undefined.

1 •••••••

Change Privileges.

Semaphored access is
standard file syste~.

*

unimplement~d

in

For field A, current access privil~ges, the
privile~c is r~~~ access only.

def~ult

~o

ror fi~lci 13, public
public 3ccess.

aCCI~SS,

the defnult is

For field C, ow~er'5 3CC~SS, the rlcfnult is
r0nd,
write,
~xt~nd,
nxclusiv" ~nd renn~e
(00101111 ) ~cccss.

4

HEP OPERATING

SYSTE~

File History - Field D
Determine
a new file.

whether to use an old file or

cre~te

Values:
O-Use old file if present,
file - this is the default.

else

create new

1-Create new file, delete old file if present.
2-Use old file, fail if not present.
3-Cr~ate

new file, fail if old file is present.

File Disposition - Field E
Specifies the disposition of the file upon
close. Entries in"this field on open are kept until
the close. If no entries are specifi~d on close
those specified with the open will be usedo
O-Keep old file, delete new file - default.

1-Delete file on closA.
2-R~tnin

file on close.

*3-Ret3in file on system close (i.e. ABTERM),
delete on us~r closp. (normal termination).
*4-Retain on user close, delete on system close.
**~-R~tnin

*

These

**

V~lid

and

ren8~e

file.

meaning only on open.
for close only.

h~ve

t~e ~nse of a file open~d s~veral ti~es th~
disposition spccifi~d (open or clos~) in
chrcno10~i~nl
orier rl~termines th~ file ciisposition
which will be us~1.

In

18st

5

"HEP OPERATING

SYSTE~

IIO Direction - Field F
Controls th~ initial positioning of the file,
anrt the direction for sequential acc~ss. This field
is ignored by close.
O-Forward - Op~n
file
positioned
at
the
beginning of the first record, do 1/0 in
forward direction - default.
1-Backward - Open
file
positioned
at
the
beginning of the last logical record, do 1/0
in reverse direction - this is unimplemented
in the standard file system.
- Open file positionert at the en1 of
the last logical record, do IIO in forward
direction - (appending
to a" file requires
extend privilege).

2-~ppend

Buffer Count - Field G
Number of physical records to be held in 1/0
Cache at any time. this feature is unimplemented in
the standard file system. All entries in this field
will be ignored by the I/O supervisor.

R~READ/F%WRTTE

READ and WRITE seize the LU Buffer for the LU
specified, and prepare it for 110, marking it busy,
and setting up the ERR= and END= return address~s,
and the format painter, if they arc specified. "
F%10LST
perfor~s
whntever proces~i~g is
for thA IIO Item (~c~lar or Arrny)
spe~ificd.
Wh0n t~~ buffer is full (in the case of
WRITE) or empty (in th~ cnsa of RE~D) it issues the
appropriat0 SVC.
IOLISTITE~

necessary

5

HEP OPERATING

~YSTE~

F%ST0PI
STOPIO finishes processin~ of
statement if necessary, ~nd marks
available for another I/O.

the format
the LU Buffer

F%8U~IN/F%BUFOU

BUFFER IN and BUFFEROUT combine the actions of
READ/WRITE, IOLIST and STOPIO for unformatted lID to
(from) a single IO item (Scalar or Array). They
acquire an LU Buffer, marking it busy, issue the
SVC's required for the IIO requested, and upon
completion
return
the LU 3uffer and mark it
available.
Fl)STOP IF%PAUSE
STOP and PAUSE issue the appropriate SVC (7 for
Stop, 8 for Pause) with a po~~ter to the text
supplied in the parameter block.
F%BSPAC/F%RWIND/F%WEOF

BACKSPACE, REWIND ~nd ENDFILE eRch acquire the
LU 9uffer specified, and i5su~ the appropriate SVC
(4, 5, or 5 respectively).

A t y pic ell
cal I seq II c n 0 s for c1 for m8 t ted R~ (1 d 0 r \01 r i t e
would consist of 1) a enil to F%READ (/F%WRITE), followed by
2) one or more c8115 to F%IOLST, one call for a~ch T/O list
it~~'n,
;]nrj
tcrrninut0d with 3) a call to F1,~TOPI (sc·~
E x (3 mpIG 1).
A. n u n for m.:l t ted
I l O o p e r d t ion
co u 1 d
be
accomplished in the same manner, omitting the format pointer
in the para~eter block for the F%READ/F%WRITE call. A more
efficient method however is to issue a single call to F~B~FIN
or
F%~UFnu
(se~
Example 2). Th~se result in a single
C~ll/R~turn
sequence, instead of a ~inimum of three which
would be r~quired if 1/0 is done as with for~atted I/O.

7

H~P

Exnmpl~

1:

OPERATI~G

SYSTEM

The FORTRAN Stntements
DIHENSION A(2),
READ

(6,

woulrl generate the

1000,

B( 10)
END=2000,

followin~

ERR=3(00)

s~ries

of

A,8,C

subrou~ine

cRlls:

A call to F%READ with a parameter block of

1)

t Ll\8EL 1000
l' L.l\8EL 2000

l'

o

LA9SL 30()r)

o

A call to F%IOLST for the Array A.

2)

tl\

o
A sAcond call to

F%IOLST for

o
the

Array B.
6

0

:2

I

0

o
o
o
A
;l

0

final call to F%IOLST for

!\

3)

~R

c~ll

th~

Sc~lar

C•

'f\C

to F%STOPI to finish the READ and mark the LU

v ;) i 1 () b 1 e •

o
o

o
()

;:xnrnplc?:

F'lRTRI\N

Th~

St()t~ments

DI '·1 E iJ S ION A( ~ )
f3UFPEHIN
'.oJ i) U 1.

d

f):1 : : 1!Tl :"'! t 0

g e n 8 r ;) t e n
r b 1 0 c l< ,) f :

Ei-lD=2()()'),

(I),
<:)

lJ b r

ERR='3()().l)

,) uti nee :111

!\

2()() 'J

F 1, 8 UF' T'I

1>.)

I"

('\

L i\ qt.:L

1\

.)

I

Ll\f1f.:t

?I)')')

t;

wit '1

~



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                     : 2010:07:08 20:25:44-08:00
Modify Date                     : 2010:07:08 21:31:43-07:00
Metadata Date                   : 2010:07:08 21:31:43-07:00
Producer                        : Adobe Acrobat 9.32 Paper Capture Plug-in
Format                          : application/pdf
Document ID                     : uuid:79d35d8f-ba40-4e15-a8dc-b32095e12617
Instance ID                     : uuid:8b21c1b0-e881-40f0-96b1-ae7f0f65ac30
Page Layout                     : SinglePage
Page Mode                       : UseNone
Page Count                      : 135
EXIF Metadata provided by EXIF.tools

Navigation menu