INTERPIO::FSS
mHlNlCATICN
AND
DISPA'lCHING
EXAMPLE
Procedures
in
the
utilities
section
demonstrate
how
a programmer
can
construct
facilities
to
invoke
IP
functions.
Recall
from
the
function
sunmary
in
Aweooix
B
that
an
AP
requests
an
IP
function
by
writing
a
process
selection
index,
all
required
operands,
and
finally
depositing
a
function
code
into
the
appropriate
slots
in
the
function
request
facility
(frf).
The
IP
begins
execution
of
the
function
only
after
the
function
code
has
been
written.
This
is
demonstrated
by
the
procedures
Open_window and Close_window.
The
ini
tialization
section
of
the
prog
ram
points
out
sane
simplifying
assumptions
which
are
made
for
the
~rpose
of
this
example.
First,
interrupts
are
disabled.
This
converts
the
three
tasks
of
the
printer
example
(printer
server
task,
printer
task,
and
printer
reply
task)
of
Chapter
I
into
sequential
tasks
rather
than
concurrent
tasks.
It
also
makes
it
easier
to
demonstrate
changes
in
the
state
of
the
system
and
illustrate
them
with
the
accompanying
figures.
Second,
the
calIon
the
Dispatch
procedure
asstnnes
that
only
one
IP
process
exists
in
the
432
system.
The
IP
supports
multiple
process
environments
but
only
one
is
required
in
this
example.
The
print
driver
body
contains
an
aggregation
of
code which
acoamplishes
the
three
tasks
of
the
Chapter
1 example.
Notice
that
the
three
tasks
are
performed
sequentially.
Imbedded
in
the
program
text
are
references
to
Figures
2
through
6
which
depict
the
state
of
the
432
system
objects
and
the
logical
I/O
processor
(the
IP/AP
pair).
F-3