John,
In your assembler code, you could use the DMSKEY macro to change
from user key to nucleus and back. There are a lot of warnings in the
CMS books about using DMSKEY though. You will want to read through
all those. Another option is to use IPK and SPKA instructions around
your assembler instructions to change into and out of key 0.
Cheers!
Mike Donovan
John Woods
<[EMAIL PROTECTED]
ET> To
Sent by: The IBM [email protected]
z/VM Operating cc
System
<[EMAIL PROTECTED] Subject
ARK.EDU> Changing in and out of ( SYSTEM
mode
08/30/2007 12:53
PM
Please respond to
The IBM z/VM
Operating System
<[EMAIL PROTECTED]
ARK.EDU>
I have a C application running in user mode that I would like to have call
an assembler subroutine that currently uses the (good old) BALR interface
to VCADTLKP to see if a disk mode is accessed... I know, I know... but hey,
the code works and it does what I want. The only problem, of course, is
that the C code is running is user mode and the assembler code would really
like to be in "( SYSTEM" mode. It's been a long time since I wrote a lot
of CMS code, but I seem to remember that there was a reasonably easy way to
flip in and out of SYSTEM mode (I think I need storage key zero as
well). I know I could restruture everything, but I'm trying to avoid that
if possible. A few lines of assembler would certainly be easier than
changing a few lines of C because the C application is shared between a
number of different people... weanies, actually. ;-)
Thanks
John