From:	CRDGW2::CRDGW2::MRGATE::"SMTP::CRVAX.SRI.COM::RELAY-INFO-VAX"  9-APR-1991 21:29:14.50
To:	ARISIA::EVERHART
CC:	
Subj:	Re: Possibly stupid question...

From:	RELAY-INFO-VAX@CRVAX.SRI.COM@SMTP@CRDGW2
To:	Everhart@Arisia@MRGATE

Received:  by crdgw1.ge.com (5.57/GE 1.96)
	 id AA02480; Tue, 9 Apr 91 18:24:31 EDT
Received: From DANPOST.UNI-C.DK by CRVAX.SRI.COM with TCP; Tue,  9 APR 91 08:25:26 PDT
Received: from vms2.uni-c.dk by danpost.uni-c.dk (5.65/1.34)
	id AA08634; Tue, 9 Apr 91 15:21:17 GMT
Date: Tue, 9 Apr 91 17:27 +0200
From: ISIS08@ecostat.aau.dk
Subject: Re: Possibly stupid question...
To: PETERSEN@CTRVAX.VANDERBILT.EDU, INFO-VAX@SRI.COM
Message-Id: <91E7698662FF017885@vms2.uni-c.dk>
X-Envelope-To: PETERSEN@CTRVAX.VANDERBILT.EDU, INFO-VAX@SRI.COM
X-Vms-To: UNIL63::IN%"PETERSEN@CTRVAX.VANDERBILT.EDU"
X-Vms-Cc: IN::"INFO-VAX@SRI.COM"

>    On a related note, can anyone tell me how to reach into the DCL part of
>my process space and change my DCL prompt from a user program?  I am willing
>to fight with/debug non user-mode code to make it work, but I would rather
>not if there is a way...

The following small MACRO routine will get the DCL-prompt:

        .title  prompt
        .link   "sys$system:sys.stb"/selective_search
        .link   "sys$system:dcldef.stb"/selective_search
        .psect  $CODE long,pic,con,lcl,shr,exe,nowrt
;***************************************
;
;  GETPROMPT ( PMT , PMTLEN )
;
;  get prompt
;
;***************************************
        .entry  getprompt,^m<iv,r2,r3,r4,r5>
        movl    #CTL$AG_CLIDATA,r0
        movl    W^PPD$L_PRC(r0),r0
        moval   W^PRC_B_PROMPTLEN(r0),r1
        cvtbl   (r1),@B^8(ap)
        subl2   #4,@B^8(ap)
        moval   W^PRC_G_PROMPT(r0),r1
        movl    B^4(ap),r2
        movc3   @B^8(ap),(r1),@B^4(r2)
        ret         
        .end

It can easily be changed to set the prompt. Note: you can get the prompt
from user-mode, but you will need executive-mode to set the prompt.

                                                            Arne

Arne Vajhxj                             Internet: ISIS08@ECOSTAT.AAU.DK
Institute of Economics and Statistics   PSI:      DATAPAX.23830211371400::ISIS08
Aarhus University
Denmark


