Article View: comp.os.msdos.programmer
Article #1029Re: Is a floppy formatted ?
From: Bob Konigsberg
Date: Fri, 28 Aug 1992 16:43
Date: Fri, 28 Aug 1992 16:43
25 lines
1232 bytes
1232 bytes
stern@mble.philips.be writes: >Could anybody explain me how to detect if a floppy is already formatted >or not? And also if it is simple to program a 'quick format' like in >DOS 5.0 format. I'm posting this time, having answered this before. In assembler mov ah,2 ;Read Sector function mov dl,driv_num ;0-3 allowed mov dh,0 ;head number mov cx,0001 ;track 0, sector 1 les bx,buffer ;es:bx points to read buffer of 512 bytes mov al,1 ;1 sector to read. This will fail on HP-150s int 13 ;do the I/O thing jc error ;Carry flag set on error. This actually can cover ;a number of things: not formatted, door open, ;diskette in sideways ;If you want to be really cute, you can pass a far address of a variable ;in C and use that to let a C/C++ program know the results. BobK
Technical Details
Message-ID:
<bobk.715020235@slinky.NSD.3Com.COM>Path:
arc1-ca.pugleaf.net!sparky!uunet!pmafire!news.dell.com!swrinde!mips!bridge2!slinky.NSD.3Com.COM!bobkReferences:
<1992Aug6.093943.196@mble.philips.be>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!pmafire!news.dell.com!swrinde!mips!bridge2!slinky.NSD.3Com.COM!bobk From: bobk@ESD.3Com.COM (Bob Konigsberg) Newsgroups: comp.os.msdos.programmer Subject: Re: Is a floppy formatted ? Message-ID: <bobk.715020235@slinky.NSD.3Com.COM> Date: 28 Aug 92 16:43:55 GMT References: <1992Aug6.093943.196@mble.philips.be> Sender: news@bridge2.NSD.3Com.COM Lines: 25 Nntp-Posting-Host: slinky.nsd.3com.com