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
The program exanple which follows assumes that a set of 432 system objects preexists in 432 memory. These objects are illustrated in Figure
o IP processor object;
oa print request port to which a 432 process (GOP or IP) can send print requests;
oa 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.
oseveral IP processes are shown, though only one is required for the purposes of the example;
oone 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:
oVariable 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.