Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!mips!apple!agate!ucbvax!bloom-beacon!eru!hagbard!sunic!news.funet.fi!ousrvr.oulu.fi!stekt!jml From: jml@stekt.oulu.fi (Lepp{j{rvi Jouni) Newsgroups: comp.os.msdos.programmer Subject: Formatting diskettes (prolog to summary) Message-ID: <1991Apr25.144432.15396@ousrvr.oulu.fi> Date: 25 Apr 91 14:44:32 GMT Sender: news@ousrvr.oulu.fi Organization: University of Oulu, Finland Lines: 39 The solution for my problem with diskette formatting is in the following : .. >From: ale@jvd.msk.su (Aleksey Odinokov) .. >BIOS int 13h function 18h which is called Set Parameters ... doesn't >really set parameters needed for diskette formating. But only verifies >that BIOS support for asked combination of tracks, sectors and heads >exists. Upon return this function give in es:di pointer to diskette >parameter block for asked configuration. And you have manually point >diskette parameter vector (int 1eh) to parameter block, pointer to which >you got from function 18h. And if you ask formatting after that diskette >should formated as you asked. .. After realizing this to be the solution, I even managed to find a point in the DOS's disk driver in which just the procedure described above is used. I have composed a summary about the issue, which should include the neccessary information to get diskettes of various kinds formatted, provided that the programmer already is familiar with the use of interrupt services, interrupt vectors, the general structure of disk(ettes) and such things. I hope that it would be complete and in other ways useful enough so that it could be dug up the next time this problem arises. I decided not to include my source code, since the present code fragments are far from complete. Also, the use of turbo C's pseudo variables to access registers makes the whole thing a bit shaky : the order of operations is often essential to produce code that actually does what one intends. So, I think, these would not make a great example. I'll post the summary as a separate article following this one. My English is far from perfect and so the style and grammar in the document may be somewhat odd and erratic, but there is not much I can do about that right now .. :-) Once again : Thanks to all of you who replied ! -- - Jouni Lepp{j{rvi / jml@stekt.oulu.fi - - '.. but only maybe, life is a joy .. ' -