       .title promptsub Executive mode routine for prompt.for
;
;      This routine gets two Ascic strings from the caller and stores them in
;	the CLI area.
;
prompt   = ^X870C				 ;Offsets into the cli for the
reprompt = ^X875D				 ;prompt & reprompt strings

set_prompt::
   .word   ^M<R2,R3,R4,R5,R6,R7,R8,R9,R10,R11>
   movl	   4(ap),r11				 ;R11=prompt
   movl	   8(ap),r10				 ;R10=reprompt
   $Cmexec_s exec
   ret

exec:						 ;Executive mode routine
   .word   0					 ;Save nothing
   movl	   g^ctl$ag_climage,r9			 ;R9=base of CLI
   cmpb	   #-1,(r11)				 ;Nil string?
   beql	   set_reprompt
   movzbl  (r11),r8				 ;R8=length of string
   movc5   r8,(r11),#^A/ /,#81,prompt(r9)	 ;Move in the string
set_reprompt:					 ;Do the reprompt
   cmpb	   #-1,(r10)				 ;Nil string?
   beql	   exit
   movzbl  (r10),r8
   movc5   r8,(r10),#^A/ /,#81,reprompt(r9)
exit:
   movl	   #1,r0
   ret

   .end
