A SERVICE OF

logo

APPENDIX
F
INTERPROCESS
CCMruNICATICN
AND
DISPA'lCHIt.;x;
EXAMPLE
In
Chapter
1,
a
printer
example was
used
to
demonstrate
the
flow
of
data
between 432
processes
and
AP
tasks.
In
this
appendix,
the
printer
example
is
again
discussed.
However,
this
time
the
view
taken
is
that
of
a programmer
writing
an
Attached
Processor
task
to
direct
an
IP
to
accomplish
printer
output.
The program
contained
in
this
appendix
is
written
in
a PL,!M-86-like
dialect
typical
of
the
developnent
environment which
will
be
at
the
disposal
of
the
AP
program
developer.
This
program
is
included
to
clarify
an
earlier
example and
is
not
suggested
as
a scheme
for
actual
~lementation.
The program
exanple
which
follows
assumes
that
a
set
of
432
system
objects
preexists
in
432 memory. These
objects
are
illustrated
in
Figure
F-l.
This
system
contains:
o
IP
processor
object;
o a
print
request
port
to
which a 432
process
(GOP
or
IP)
can
send
print
requests;
o a
print
reply
port
to
which an
IP
process
can
return
the
status
of
the
print
action;
o
an
IP
dispatching
port
where
IP
processes
await
service.
o
several
IP
processes
are
shown, though
only
one
is
required
for
the
purposes
of
the
example;
o one
print
object,
a
simple
data
segment, which
carries
printer
data
and
is
reused
when
returning
printer
status.
There
are
four
main
sections
to
this
program:
o
Variable
declarations;
o
Utility
procedures;
o
Initialization;
o
Print
driver
body.
In
the
variable
declarations
section,
notice
that
the
control
window, window
4,
is
declared
as
a
structure
whose
canponents
are
defined
from
the
definition
in
Appendix
A.
This
program assumes
that
window
4,
the
control
window,
is
opened
onto
the
function
request
facility
in
the
IP's
processor
object.
It
also
assumes
that
all
initialization
has
been
performed
and
that
the
IP
is
operating
in
logical
reference
mode.
F-I