From: sysop                           
Subject: Has PIO$GT_DDSTRING become a protected cell?
News-Software: VAX/VMS VNEWS 1.4-b1  
Organization: Department of Nuclear Engineering Sciences
Date:  8 Sep 1992 15:07 EST  

Since I upgraded from 5.3 to 5.5-1, the following code no longer works:

------  PWD.FOR  ----

	program pwd
*
* pwd - present working directory;  returns the default directory name
*
* Must link to .obj from DEFDIR.MAR
*
	character	dirstr*255
	integer*2	strlen

	external	sc$get_defdir

C*****

	call sc$get_defdir (dirstr, strlen)
	print *, dirstr(:strlen)
	end

------  DEFDIR.MAR -----

	.title	SC$GET_DEFDIR - Get default directory
	.ident 	/V1.0/
	.sbttl 	Documentation
;
;	PURPOSE:	Callable routine to get the default directory.
;	AUTHOR:		Shawn Clifford
;	ENVIRONMENT:    VAX/VMS V5.1  /  VAX Macro
;	DATE:		20-JUL-1989
;	FORMAT:		SC$GET_DEFDIR   dir-str, str-len
;
;	     cur-dir-addr
;		VMS Usage:  char_string
;		type:	    character string
;		access:	    write only
;		mechanism:  by descriptor-fixed length string descriptor
;	     Default directory string.  The cur-dir-addr is the address of a
;	     descriptor pointing to the character buffer that will receive
;	     the current directory string.  Maximum length is 255 characters.
;
;	     len-addr
;		VMS Usage:  word_unsigned
;		type:	    word (unsigned)
;		access:	    write only
;		mechanism:  by reference
;	     Length of the directory string.  The len-addr argument is the
;	     address of the word that will receive the length.
;
;	EXTERNALS:	Symbol PIO$GT_DDSTRING contained in SYS.STB.  A vector
;	     to a counted string of the default directory stored in the
;	     process address space.  The first byte at this address is the
;	     length of the directory string.
;
;	EXAMPLE (Fortran):
;                                        
;	     character  dirstr*255
;	     integer*2  strlen
;	     external   sc$get_defdir
;
;	     call sc$get_defdir (dirstr, strlen)
;
	.enable suppression
	.disable traceback, debug
	.link	'sys$system:sys.stb' /se

		$SSDEF				; define SS$ symbols
;
;		AP(0) = arg count
;		AP(4) = dir-str       --> r6          
;		AP(8) = str-len       --> r7
;

length:	.byte					; length of directory string

	.sbttl	Main code
	.psect	$code, long, exe, nowrt, pic, shr
	.entry	sc$get_defdir, ^m<r6,r7>	; entry point to SC$GET_DEFDIR

;     Check for correct number of arguments
	movab	g^lib$sig_to_ret, (fp)		; save return signal
	cmpb	(ap), s^#2			; compare arg count to 2
	beql	10$				; branch if 2 args
	movzwl	#SS$_INSFARG, r0		; return with status
	ret
	
10$:	movl	4(ap), r6			; store descriptor to DIR-STR
	movl	4(r6), r6			; store addr to DIR-STR data
	movl	8(ap), r7			; store addr to STR-LEN
	movb	pio$gt_ddstring, length		; store the length of string
	movb	length, (r7)			; write it to STR-LEN
	movc3	length, pio$gt_ddstring+1, (r6) ; write DIR-STR
	movl	s^#1, r0			; setup return code
	ret					; return

	.end



Has PIO$GT_DDSTRING changed, or has the way the information is accessed
changed?

-------------------------------------------------------------------------------
Shawn A. Clifford, System Manager | Internet: sysop@robot.nuceng.ufl.edu
Nuclear Engineering Sciences      |		sac@eng.ufl.edu
University of Florida             | Home Phone: 904/335-4914
Gainesville, Florida  32611       | Work Phone: 904/392-1450  FAX: 904/392-3380
-------------------------------------------------------------------------------