[mod.computers.vax] Problem with uVMS/VS-II GPX workstation device driver

JDM@XX.LCS.MIT.EDU.UUCP (02/07/87)

I have a problem with graphics on a uVAX II GPX running VMS.  If you
are a VMS system programmer or have solved this problem before, you
may be able to help me, and I will be very much indebted to you.  If
you are writing window related graphics on your GPX, you may be
interested, because you'll probably run into this problem as well.  I
am running uVMS 4.4 and VWS 3.0 on a 4 plane intensity uVAX II/GPX
with 7meg of memory.

I need to to allocate memory out of S0 space, the non-paged pool.
Brad Burquest from DEC customer support has pointed me to the
operating system routine EXE$ALONONPAGED on page C-13 of Docset Volume
10C "System Programming".  Neither of us has gotten it to work, as it
requires CMKRNL, which is tricky to use.

The reason I want to do this is as follows: I need to do simple
graphics directly to the uVAX II/GPX screen, without being clipped to
existing UIS windows.  As documented in the Video Device Driver
Manual, section 5.4, the way to do this is to get the address of the
system viewport, obtain a DOP (Drawing OPeration) structure for use in
this viewport, stuff the DOP with the graphics calls I want, and
insert it back in the viewport request queue.  To obtain a DOP
structure, as shown on page 5-9, you first check the viewport to see
if there are any free DOPs on the queue.  If not, you must allocate a
new one.  The documentation (page 5-10) says to use LIB$GET_VM, but
that's not correct.  LIB$GET_VM allocates memory out of P0 space, with
the 32nd bit low.  This memory is paged, and its address only makes
sense in the context of the user process.  DOPs that are already on
the system viewport free-list have the 32nd bit high, and are thus in
S0 space (non-paged, I believe).  Here is the address of a DOP
obtained from the system queue:

	801832E4					(Hex)
	1000 0000 0001 1000 0011 0010 1110 0100		(Binary)

If I try to use a DOP structure allocated with lib$get_vm in the system
viewport, the operation will not be executed, and the workstation will
hang the next time I try to do a UIS operation such as a select-window
mouse-hit.

If you are interested, I can send you a C/Macro program for drawing a
box on the QDSS screen.  It allocates a DOP using the DOP$REMQUE
procedure to remove one from the system free-list.  If there are none,
it tries to allocate one using LIB$GET_VM, which inevitably will return
an address in P0 space (< 80000000 hex).  If the program is allowed to
proceed, the workstation will hang.

It is obviously possible to do this, since the UIS window manager must
do it when you drag or resize a window with the mouse.

Thanks In Advance,
-Joshua Marantz

ps.  Please respond by mail as well as posting.

ARPA:	jdm@xx.lcs.mit.edu
UUCP:	ucbvax!mit-vax!josh


-------