Loading...

freedos-user@lists.sourceforge.net

[Prev] Thread [Next]  |  [Prev] Date [Next]

[Freedos-user] writing a loadable block driver for 4k-sector drive (Questions) Bertho Grandpied Mon Feb 20 03:00:37 2012

Dear List... I'm calling back with respect to the 4k-sector USB disk drive. I'm 
considering writing a loadable DOS 'block' driver for it, as Eric Auer 
suggested. My experience with programming DOS driver is unfortunately more on 
the side of character devices than block, so, please bear with basic questions 
for a moment if you please. 

I would like to take the simplest approach possible first, even at the expense 
of performance. My driver would be little more than a 'shell' around 
USBASPI.SYS.

Therefore my first interrogation is, what set of device header attributes - and 
associated functions, including IOCTL codes - must be present /at a minimum/ 
for letting DOS access the disk properly ?

- For a tentative and probably naive self answer, could I get away with the 
driver attribute being all zeroes - and implement functions 0, 1, 2, 4, 8, 9 
(alias for fn 8) /only/ ? Assuming this basic set of functions properly 
implemented, will the device work ? Do we /need/ 0D,0E (open/close) for 
instance ?

- Using a loadable driver for the block device implies DOS won't use /its/ 
internal buffers, so I don't have to care about DOS own buffers sizing, right ?

- Besides, should I consider using the "non IBM format" bit in driver attribute 
? From whatever docs I saw is unclear what "non IBM" changes exactly in how DOS 
uses the driver, nor the (dis)advantages of that approach and the requirements 
it puts on (removes from) the driver.

TIA !

-- 
Czerno

------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
_______________________________________________
Freedos-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freedos-user