gt7103c@prism.gatech.EDU (gt7103c MOBLEY,MICHAEL GRAHAM) (05/22/91)
I have a question about parking the heads on hard drives. There is a function (#19) in interrupt 13 (I think it's 13) that is the "park heads" function. It requires the "Drive ID" to be specified in DL. Just what is the ID of a drive. I've tried 00 through 03 thinking that maybe it was just the logical drive number. I've also tried Norton Utilities and Norton DI, but neither mentioned anything called the "drive ID." Actually, for all I know, what I've been doing is working. I tried putting the program "park.com" on a floppy to see if I could actually hear and see (LED) the drive park and I could. However, any subsequent run of "park" and the drive made no noise (because it was already parked). My program that calls funtion 19 did nothing. It didn't crash, it just didn't park the drive either. Maybe certain drives don't support function 19, but then how does "Park.com" do it? What is a drive ID anyhow? Is there another way to park the heads, such as telling the drive to go to track 615 or wherever? By the way, I'm trying to write a TSR that will park the heads after a certain period of inactivity, like a screen saver. I think there are probably already programs that do this, but I want to see if I can do it myself. I'm writing in Turbo C. Any help or insight would be appreciated. E-Mail to gt7103c@prism.gatech.edu. Thanks, Michael -- MOBLEY,MICHAEL GRAHAM Georgia Institute of Technology, Atlanta Georgia, 30332 uucp: ...!{decvax,hplabs,ncar,purdue,rutgers}!gatech!prism!gt7103c Internet: gt7103c@prism.gatech.edu
ins845b@monu4.cc.monash.edu.au (mr k.l. lentin) (05/22/91)
The ID numbers for floppies start at 0 and those for hard drives start at hex 80 (I think). Norton DI does give this info. Look for a number in that range. |/ |\evin
reaper@wixer.helps.cs.utexas.edu (Keath Milligan) (05/23/91)
As far as I know, there is no standard sub-function 19 (or 19h) to the BIOS diskette services interrupt 13h. My version of PARK.COM parks the hard-drive heads by first using interrupt 13h, sub-function 08h (with the fixed-disk drve number in DL, 80h for the first fixed-disk, 81h for the second and so forth) to return the parameters for the drive: mov ah,08h mov dl,80h int 13h jc error ;your error-handler, error code in ah cmp dl,0 ;dl=0 == no fixed disks attached je error_nod ;another error-handler you should write Int 13h, function 08h will return the number of tracks per side in CH, the number of sectores per track in CL, number of sides (heads) in DH, number of consecutive drives attached in DL, a pointer to a parameter-table in ES:DI, and, finally, if the drive is a floppy, a drive type value in BL. For the most part, you only need to be concerned about the number of sides (DH) and the number of tracks per side (CH) in order to park the heads. Next, function 11h (recallibrate fixed disk) of Int 13h is used: mov ah,11h mov dl,80h int 13h jc error I can't seem to find much documentation on this function, so I'm afraid I don't know exactly what it does... Finally, function 0Ch (seek cylinder) is used once to seek track 0 and then again to seek the maximum track# for a side: mov ah,0Ch mov cx,0 ;seeking track 0, sector 0 mov dl,80h ;fixed-disk # mov dh,0 ;head number int 13h ;seek track 0 mov ah,8 ;get drive parameters mov dl,80h ;fixed-disk # int 13h ;get max tracks per side in ch mov ah,0Ch mov dl,80h mov dh,0 ;head# int 13h ;seek track in ch
a_rubin@dsg4.dse.beckman.com (05/23/91)
In <1991May22.170907.2417@wixer.helps.cs.utexas.edu> reaper@wixer.helps.cs.utexas.edu (Keath Milligan) writes: >As far as I know, there is no standard sub-function 19 (or 19h) to the BIOS >diskette services interrupt 13h. Ralf Brown's interrupt list reports on XT/286, PS/2 Int 13h function 19h is park heads (some code omitted) >Next, function 11h (recallibrate fixed disk) of Int 13h is used: >I can't seem to find much documentation on this function, so I'm afraid I don't >know exactly what it does... Ralf Brown again, on Int 13 function 11 (Note: causes hard disk controller to seek the specified drive to cylinder 0) -- a_rubin@dsg4.dse.beckman.com My opinions are my own, and do not represent those of my employer.
barnett@rex.cs.tulane.edu (Karey Barnett) (05/23/91)
Hi, For parking the heads using interrupt 0x13, function 0x19, the "ID" that needs to be put into DL has values 0x80 to 0xff. Thus, to park drive C:, put 0x80 into DL. For drive D:, use 0x81, etc. I got this information from an advanced MSDOS programming book.
barnett@rex.cs.tulane.edu (Karey Barnett) (05/23/91)
In article <1991May22.170907.2417@wixer.helps.cs.utexas.edu> reaper@wixer.helps.cs.utexas.edu (Keath Milligan) writes: >As far as I know, there is no standard sub-function 19 (or 19h) to the BIOS >diskette services interrupt 13h. My advanced MSDOS programming books indicates that this function is supported on PS/2's ONLY. >Next, function 11h (recallibrate fixed disk) of Int 13h is used: > > mov ah,11h > mov dl,80h > int 13h > jc error > >I can't seem to find much documentation on this function, so I'm afraid I don't >know exactly what it does... This function positions the read/write arm to cylinder 0, and returns the drive status.