Wolfgang Lenerz writes:

> > On the Open call the PFF device driver's primary functions are
> >     decode the name
> >     check the details
> >     set up and configure a channel definition block
>
> yes, indeed!
>
> > If all of the above are ok then, on exiting,
> >     set the calling job's program counter to a subroutine that
> >         starts an independent job that opens any channels and
> >         keeps things moving, ie a Driver JOB,
> >         and then
> >     returns to the calling job, where it left off, with a channel ID.
>
> This poses a certain number of problems, not alone that of
> not knowing at all where the calling job's PC lies.
>
> After all, by the time your (my) device driver open routine
> is called, there are so many things on the stack including
> return addresses within the IOSS (the very first one, for
> example, is one), that I would be very hesitant to say "ok,
> this is the job's routine address and I'll change that".

That shouldnt be too difficult: You can easily find out which job is
currently executing (ie the job making the Open call to PFF), get its PC
from the JCB. (Its not going to die on you while this is going on: were in
SV mode, remember) You then stack the job's current PC on its SP and put the
desired subroutine address in its PC, then return to the calling job in the
normal way. The calling job will (quite unconciously and harmelssly) set up
and activate the printer driver job.

> > The Driver Job could then set up the appropriate Filter Program for that
> > protocol (is this really needed?)
>
>  I don't belive it, but Rich does.

I cant see any reason for not just using a single protocol, eg ESC/P2, as
all applications with their own printer drivers are likely to support it,
and applications that dont have printer drivers can use it anyway. Some
trickery might have to be performed if the application's output was already
in Ghostscript or Proforma format, but this should be done at the time of
the Open call, eg by appending a suitable letter to the name, eg PFFdp (for
Direct Proforma), then let the printer driver job (as explained) take care
of
the rest.

Per

_______________________________________________
QL-Users Mailing List
http://www.q-v-d.demon.co.uk/smsqe.htm

Reply via email to