Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to check disk drive for disk? help...

0 views
Skip to first unread message

Matthew T. Woodward

unread,
Jul 18, 1996, 3:00:00 AM7/18/96
to

I've been trying to figure out how to check the floppy drive for a disk.
I know there is a BIOS routine and also a DOS API function. If anyone can
help, I'd appreciate it.

Here's my disfunctional code:

; Check floppy drive for disk. Conditional Jump back to L1 if there is.
L1:
MOV AH,01h
INT 13h
CMP AL,80H
JNE L1

01h is supposedly "get diskette status", but I never see my drive light
go on.

I've also tried to use 4407h, where 07 function is "whether drive is ready
for output" test.

Can someone help me here?

Thanks in advance.

- Matt W.

--------------------------[ Join me on the Web ]-------------------------------
"Silly Me..." <mtwo...@mailbox.syr.edu> | "If the future's looking dark
Computer Science at Syracuse University | We're the ones who have to shine
Kappa Delta Rho - Mu Beta chapter | If there's no one in control
#include <std-disclaimer.h> | We're the ones who draw the line"
PGP-key not yet available.... | - Neil Peart
----------------------[http://web.syr.edu/~mtwoodwa]---------------------------


Charles Dye

unread,
Jul 19, 1996, 3:00:00 AM7/19/96
to

In article <4slqu2$3...@newstand.syr.edu>, mtwo...@syr.edu wrote:
>I've been trying to figure out how to check the floppy drive for a disk.
>I know there is a BIOS routine and also a DOS API function. If anyone can
>help, I'd appreciate it.

Various methods are possible. My favorite is to hook INT 24h (to prevent
Abort, Retry, Fail) and then use DOS INT 21h .AH=36h. If it returns
AX=0FFFFh, then there's a problem -- most likely, no disk in the drive.

ras...@indirect.com

Jim Neil

unread,
Jul 20, 1996, 3:00:00 AM7/20/96
to

In article <4slqu2$3...@newstand.syr.edu>, mtwo...@smith.cis.syr.edu (Matthew T. Woodward) says:
>
>I've been trying to figure out how to check the floppy drive for a disk.
>I know there is a BIOS routine and also a DOS API function. If anyone can
>help, I'd appreciate it.
>
>Here's my disfunctional code:
>
>; Check floppy drive for disk. Conditional Jump back to L1 if there is.
>L1:
> MOV AH,01h
> INT 13h
> CMP AL,80H
> JNE L1
>
>01h is supposedly "get diskette status", but I never see my drive light
>go on.
>
>I've also tried to use 4407h, where 07 function is "whether drive is ready
>for output" test.
>
>Can someone help me here?

Matt-

I don't know if this is too obious, but my docs say you must
specify the drive in question in DL, where 00-7Fh are floppy
drives and 80-FFh are fixed disks. You might also want to
check for error return of: 06h - floppy disk removed.

I hope this helps.

Jim Neil
jim-...@digital.net

andrew kennedy

unread,
Jul 22, 1996, 3:00:00 AM7/22/96
to mtwo...@syr.edu
Matthew T. Woodward wrote:
>
> I've been trying to figure out how to check the floppy drive for a disk.
> I know there is a BIOS routine and also a DOS API function. If anyone can
Try this.
CHKDISK.ASM

andrew kennedy

unread,
Jul 22, 1996, 3:00:00 AM7/22/96
to mtwo...@syr.edu
CHKDISK.ASM
0 new messages