home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky vmsnet.internals:1227 vmsnet.misc:766
- Path: sparky!uunet!noc.near.net!news.bbn.com!news.bbn.com!news
- From: mjensen@BBN.COM (Martin Jensen)
- Newsgroups: vmsnet.internals,vmsnet.misc
- Subject: Exit handlers in VAX-C
- Date: 31 Aug 1992 15:43:25 GMT
- Organization: Bolt Beranek and Newman Inc., Cambridge MA
- Lines: 26
- Distribution: na
- Message-ID: <la4fgtINNhs6@news.bbn.com>
- Reply-To: mjensen@BBN.COM (Martin Jensen)
- NNTP-Posting-Host: reliant.bbn.com
-
- Thank you O Gods of VMS for a prompt and satisfying response to my
- earlier query!! Now for the next question :-)
-
- I'm trying to write an exit handler for a VMS program written in
- VAX-C. The various VMS manuals have left me a little confused as to
- the calling conventions for exit handlers.
-
- The Programming Resources Guide indicates that the exit handler
- should be written as a subroutine - implying (in my mind anyway) that
- the handler is called with a JSB and should return with a RSB. Other
- documents seem to indicate that the handler is called as a normal
- procedure - implying (again, in my mind) that the handler is called
- with a CALL(S,G) and should return with a RET instruction.
-
- As you can't write subroutines in C, this leaves me stuck with MACRO
- if the first case is true. If the second case is true, I can code it
- in C and stick it in a shared library (which for various reasons is
- the preferable way to go!).
-
- Any of you VMS gurus care to comment on the correct convention?
-
- Thanx.
-
- --- Martin Jensen \ BBN Communications \ #include ---
- --- mjensen@bbn.com \ 150 CambridgePark Dr. \ <std.disclaimer> ---
- --- (617) 873-4859 \ Cambridge, MA 02140 \ ---
-