* Program 	: Determines current drive
* Author	: Stephen McNabb
* Creation date : 15th February 1995
* Last update	: 15th February 1995
* Parameters	: None
* Output	: Drive number in d0
*		  0 - Drive A
*		  1 - Drive B
*		  etc.

start:	jsr	cls		/clear the screen
	move.w	#$19,-(sp)	/use Dgetdrv() function
	trap	#1		/use gemdos
	addq.l	#2,sp		/tidy up stack
	move.b	d0,d1		/store a copy of drive number in d1

	move.l	#text,d0	/move address of string to d0
	jsr	ptext		/and print it

	add.b	#65,d1		/convert drive number to drive letter
	move.b	d1,d0		/move drive letter to d0
	jsr	pchar		/and print it to screen

end:	jsr	exit		/exit from program

	include	"\SOURCE\FUNCTION.S"	/include standard functions

*** Program Data ***

text:	dc.b	'You are using drive ',0

*** End of file ***	