A SERVICE OF

logo

INTERPR:nSS
C(l.MJNICATICN
AND
DISPATCHING
EXAMPLE
/**************************************************************************************/
/*
Seven
object
selectors
are
required.
One
for
the
message
slot
in
the
COntext
*/
/*
Acx:ess Segment,
sioce
this
is
where
the
hardware
will
put
the
Access * /
/*
Descriptor
(AD)
for
the
Print
Request
Message
following
the
Receive
instruction.
*/
~
~
/*
One
for
the
Print
Request
Port
am
one
for
the
Print
Reply
Port.
We
assume * /
/*
that
at
system
initialization
~
for
these
ports
were
stored
in
slots
nine
*/
/*
am
ten
of
the
Context
Access Segment
in
Process
Obj
eet
1.
* /
/*
*/
/*
One
for
the
IP
Dispatching
Port,
one
for
the
IP
Processor
Carrier
data
segment,
*/
/*
one
for
the
IP
Processor
Carrier
access
segm~t,
and
for
a
null
access
descriptor.
*/
/*
These
are
required
so
that
blocking
Receives
am
blocking
sends
can
be
handled.
*/
/*
We
assume ADs
for
these
objects
are
stored
in
slots
eleven,
twelve,
and
thirteen,
*/
/*
respectively
of
the
Context
Access Segment
in
Process
Object
1
at
initialization.
*/
/**************************************************************************************/
Declare
message
obj
sel
Declare
reques(Jx>r~obj_
sel
Declare
rep1Y.J?Ort_
obj_
sel
Declare
dispa:chirgyort
_
obj_sel
Declare
psoi:'
carrier
as
obj
sel
Declare
psor-carrier-ds-obj-sel
Declare
null:
destination
_
obJ_
sel
literally
'OOllOOB';
literally
'100l00B';
literally'lOlOOOB';
literally
'10ll00B';
literally
'llOOOOB';
literally
'110100a';
literally
'11l000B';
/**************************************************************************************/
/*
The
process
selection
index
for
process
number
1.
Note
that
this
number
is
a
byte
* /
/*
imex
into
the
process
selection
list
in
the
IP
processor
access
segment. * /
/**************************************************************************************/
Declare
process_l
literally'OOOOOOOOOOOOOlOOB';
/************************************************/
/*
*/
/*
Utility
Procedures
*/
/*
*/
/************************************************/
Await
function
completion:
Procedure;
-
/***********************************************w**********************************/
/*
This
procedure
b..l~
waits
for
the
previous
function
request
to
canplete.
It
*/
/*
Spins
waiting
for
the
function
completion
field
of
the
function
state
to
*/
/*
equal
zero.
*/
/**********************************************************************************/
Ik> While
(Wirxlow
4.frf
fuoction
state
am
OOOFH)
<>
0;
EM;
Em
- - -
~lit_function_completion;
F-5