home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / vmsnet / internal / 1227 < prev    next >
Encoding:
Internet Message Format  |  1992-08-31  |  1.7 KB

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