U0012@DGOGWDG5.BITNET ("GWDGV1::MOELLER") (05/17/88)
> (Peter Scott <PJS@NAIF.JPL.NASA.GOV> asked > how to find out what a facility-specific status code could be > translated into text. In general an image may exit with an image-specific status code which is not in any message library, so you have to know the image that produced the status. given that you know the image, here's a (e.g.FORTRAN-callable) MACRO subroutine to reproduce that image's exit, so the the appropriate message will be output again. N.B. make sure the status input to the routine has the "don't signal"-bit (hex 10000000) clear, otherwise nothing will be output. ---------- cut here -------- .title xfmsg use $IMGACT to issue exit message ; ; this subroutine copies part of itself upon the stack, ; loads an image and then *exits* with status ; ; call: ; subroutine xfmsg(image,status) ; character*(*) image ! default is 'SYS$SYSTEM:.EXE' ; integer status ! by reference ; * does not return * ; stackcode: ;entered here via JUMP ; movab handl,(fp) ; subl #512,sp movl sp,r6 ;r6 -> hdrbuf pushab dflnam1 pushl #dflnam1l $imgact_s name=(r7),dflnam=-8(r6),hdrbuf=(r6) blbc r0,13$ $imgfix_s blbc r0,13$ ; movl r8,r0 13$: $exit_s r0 ; handl: .word ^m<> ;brute force catch-all handler moval @1*4(ap),r1 blbs 4(r1),9$ $exit_s 4(r1) 9$: movl s^#ss$_continue,r0 ret ; dflnam1: .ascii "SYS$SYSTEM:.EXE" dflnam1l=.-dflnam1 ; stackcodel=.-stackcode ; end of stack code ; .ENTRY XFMSG,^m<r2,r3,r4,r5,r6,r7,r8> ; movaq @1*4(ap),r7 ;-> image name dsc. movl @2*4(ap),r8 ;status ; subl #stackcodel,sp movc3 #stackcodel,stackcode,(sp) ; jmp (sp) ; .end ---------- cut here -------- P.S. I sincerely hope no-one still uses VMS V4.0 or V4.1 ... Wolfgang J. Moeller, GWDG, D-3400 Goettingen, F.R.Germany | Disclaimer ... Bitnet/Earn: U0012@DGOGWDG5 Phone: +49 551 201516 | No claim intended