* Program 	: Gets the current path into a buffer
* Author	: Stephen McNabb
* Creation date : 16th February 1995
* Last update	: 16th February 1995
* Parameters	: Drive letter 0=Default, 1=A, 2=B etc.
*		  Address of 64 byte buffer
* Output	: Current path is stored in buffer

start:	jsr	cls		/clear the screen
	move.w	#0,-(sp)	/move drive number to stack
	move.l	#buffer,-(sp)	/move address of buffer to stack
	move.w	#$47,-(sp)	/use Dgetpath() function
	trap	#1		/use gemdos
	addq.l	#8,-(sp)	/tidy up stack
	
	move.l	#text,d0	/move address of string to d0
	jsr	ptext		/and display on screen
	
	move.l	#buffer,d0	/move address of path string to d0
	jsr	ptext		/and print to screen
	
	jsr	exit		/exit from program

	include	"\SOURCE\FUNCTION.S"	/include standard functions

*** Program Data ***

buffer:	ds.b	64		/64byte buffer to hold path string
text:	dc.b	'You are currently in the directory ',0

*** End of file ***	