Article View: comp.lang.asm370
Article #21TSRs in VM
From: "John A. Pershing Jr."
Date: Wed, 08 Apr 1992 14:37
Date: Wed, 08 Apr 1992 14:37
39 lines
2855 bytes
2855 bytes
First you need to find some usable notification event, and then you have
to figure out how to hook into that event.
I seem to remember hearing at one time that CP presented the virtual
reader with an unsolicited ATTN interrupt whenever a file was spooled
to the reader. IF THIS IS TRUE (it may not be -- my memory is
notoriously faulty), then you can probably hook I/O interrupts and go
from there. Check into the HNDIO macro, which allows you to establish
a "disabled interrupt exit" (DIE) for a specific device (e.g., the
reader). However, HNDIO exits may not survive ENDCMD and/or ABEND
cleanup processing, so this may not work for a nucleus extension; you
will have to read the manuals, and perhaps do a bit of experimenting.
The other tack (this is the all-time favorite of CMS hackers) is to
steal the I/O New PSW, act on the ATTN interrupts from the reader (if,
in fact, CP does present these interrupts), and the pass the interupts
on through to CMS's FLIH. In both of these cases, you will be running
disabled, and you will be severely limited in what CMS services you can
use -- note that the bulk of CMS is not reentrant and, therefore, not
usable from a FLIH. E.g., you will *not* be able to invoke DMSDDL to
inhale the spool file; the best that you can do is issue CP commands
(via DIAG 8) to try to do something to the spool file that will
convince PROFS to leave its grubby hands off of it (e.g., can you
change the class of the file, or spool it HOLD, or something?).
The other possibility is to intercept the message that CP sends you
when the file is spooled ("RDR FILE nnnn SPOOLED FROM RSCS"), which is
what IUCVTRAP, et al., are doing. Unfortunately, your only choice here
is to intercept *all* CP messages, which leaves you with the problem of
what to do with the messages that you don't want to process. This tack
is probably "safer" and "easier", but is a lot less fun. Also, I
believe that there are problems in "sharing" IUCV interrupts, so you
may have problems with programs stealing the interrupts away from you.
Of course, you can solve this problem by stealing the External New PSW
and filtering out the interrupts that you want.
I'm sure others will have better ideas.
John Pershing
IBM Research, Yorktown Heights NY
Technical Details
Message-ID:
<9204081507.AA23642@mammoth.Berkeley.EDU>Path:
arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!magnus.acs.ohio-state.edu!usenet.ins.cwru.edu!agate!dog.ee.lbl.gov!ucbvax!YKTVMH3.BITNET!PERSHNGShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!magnus.acs.ohio-state.edu!usenet.ins.cwru.edu!agate!dog.ee.lbl.gov!ucbvax!YKTVMH3.BITNET!PERSHNG
From: PERSHNG@YKTVMH3.BITNET ("John A. Pershing Jr.")
Newsgroups: comp.lang.asm370
Subject: TSRs in VM
Message-ID: <9204081507.AA23642@mammoth.Berkeley.EDU>
Date: 8 Apr 92 14:37:22 GMT
Sender: daemon@ucbvax.BERKELEY.EDU
Reply-To: IBM 370 Assembly Programming Discussion List
<ASM370%OHSTVMA.BITNET@jade.Berkeley.EDU>
Distribution: inet
Organization: The Internet
Lines: 39