[comp.sys.amiga.programmer] TD_CHANGESTATE in C

jesup@cbmvax.commodore.com (Randell Jesup) (01/31/91)

In article <43231@nigel.ee.udel.edu> LASKEY@svax05.pcr.co.uk writes:
>	My problem lies with determining if there is a disk in the specified
>drive (eg AmigaDOS INFO command). I understand that I probably need to use 
>TD_CHANGESTATE in the trackdisk.library but that's where I lose it with my 
>lack of experience!

	Actually, Info uses the dos packet ACTION_DISK_INFO sent to the
device (aka df0:, dh0:, etc).

	You can query the state of the trackdisk directly.  See the trackdisk
section of the RKM.  Basicly you open the device, and send a TD_CHANGESTATE
to the drive.  It comes back with io_Actual non-zero if there's a disk
in the drive.

-- 
Randell Jesup, Keeper of AmigaDos, Commodore Engineering.
{uunet|rutgers}!cbmvax!jesup, jesup@cbmvax.commodore.com  BIX: rjesup  
The compiler runs
Like a swift-flowing river
I wait in silence.  (From "The Zen of Programming")  ;-)