The MASM Forum

Miscellaneous => 16 bit DOS Programming => Topic started by: Gunther on June 15, 2014, 02:38:29 AM

Title: DOS driver tutorial
Post by: Gunther on June 15, 2014, 02:38:29 AM
I've to program for an embedded DOS system. Where can I find a DOS driver tutorial?

Gunther
Title: Re: DOS driver tutorial
Post by: MichaelW on June 15, 2014, 03:45:38 AM
If I recall correctly Ray Duncan's Advanced MS-DOS Programming, and the MS-DOS Encyclopedia (Ray Duncan editor), both published by Microsoft, covered device drivers in detail and included example code.

Also  Geoff Chappell's (http://geoffchappell.com/) book DOS Internals is a good possibility.

And the MS-DOS Programmer's Reference, at least for versions 5 and 6, included a chapter but nothing in the way of code details or example code.


Title: Re: DOS driver tutorial
Post by: dedndave on June 15, 2014, 04:56:12 AM
maybe quicker...
i believe Ralf Brown had some information on drivers

i still remember some of that stuff - lol
i learned from Ray Duncan's book
one of the first things to decide is whether you are writing a character device or a block device
there is also a CLOCK$ device, a special case of a character device
a typical character device replaces system defined devices, like CON, PRN, NUL, etc
typical block devices are RAMDRIVES, and so on
any driver that doesn't fit one of the character device models is usually written as a block device

if you have specific questions, let me know - i may be able to help

are you writing a driver for a piece of hardware ?
Title: Re: DOS driver tutorial
Post by: FORTRANS on June 15, 2014, 05:17:34 AM
Hi,

   "Advanced Assembly Language", by Allen L. Wyatt, Sr. has a
chapter on device drivers.  Both character and block device
drivers were built.

HTH,

Steve N.
Title: Re: DOS driver tutorial
Post by: Gunther on June 15, 2014, 07:09:59 PM
Thanks to all. I've Ray Duncan's books in my book shelf - probably in the basement. I don't know the books by Geoff Chappell and Allen L. Wyatt, Sr. Are they worth reading?

It seems that web tutorials don't exist.

Gunther
Title: Re: DOS driver tutorial
Post by: MichaelW on June 15, 2014, 07:59:12 PM
Quote from: Gunther on June 15, 2014, 07:09:59 PM
I don't know the books by Geoff Chappell and Allen L. Wyatt, Sr. Are they worth reading?

DOS Internals is well written and was a useful reference for me at the time, but I don't have any clear memory of device driver-related information in it. I would start with the Ray Duncan books.
Title: Re: DOS driver tutorial
Post by: sinsi on June 15, 2014, 08:10:38 PM
This is shareware (I think), but it's from 1994...
CHAPTER.009 is the one you want.
Title: Re: DOS driver tutorial
Post by: dedndave on June 15, 2014, 09:14:36 PM
if you have Ray Duncan's Advanced MS-DOS Programming book, you have everything you need   :t
Title: Re: DOS driver tutorial
Post by: FORTRANS on June 15, 2014, 11:00:30 PM
Quote from: Gunther on June 15, 2014, 07:09:59 PM
I don't know the books by Geoff Chappell and Allen L. Wyatt, Sr. Are they worth reading?


Hi Gunther,

   The book by Wyatt is somewhere between okay and good.
It is sort of a  "Advanced Assembly for Beginners" style of book.
Good explanations, and nicely commented code.  Some redundancy.
But not very deep if used as a reference.  Worthwhile, but not
mandatory in my opinion, if you have other sources to work with.

Regards,

Steve N.
Title: Re: DOS driver tutorial
Post by: Gunther on June 15, 2014, 11:32:06 PM
Dave, Michael and Steve,

thank you for the fast answers. Special thanks to Sinsi for providing the material.  :t

Gunther
Title: Re: DOS driver tutorial
Post by: Gunther on June 16, 2014, 12:54:02 AM
I've checked my basement and found: Advanced MS-DOS Programming. The Microsoft(R) Guide for Assembly Language and C Programmers. By Ray Duncan. Chapter 14 presents a skeleton example for a driver. I found furthermore Extending DOS. A Programmers Guide to Protected-Mode DOS. It has two working driver examples for an EMS and a XMS ram disk.

I think that'll be my starting point.

Gunther
Title: Re: DOS driver tutorial
Post by: nidud on June 16, 2014, 01:26:39 AM
deleted
Title: Re: DOS driver tutorial
Post by: Gunther on June 16, 2014, 04:23:07 AM
Hi nidud,

Quote from: nidud on June 16, 2014, 01:26:39 AM
Here is the last device driver I wrote if that helps.

thank you.  :t

Gunther
Title: Re: DOS driver tutorial
Post by: dedndave on June 16, 2014, 04:32:55 AM
suggestion, Gunther....

boot from a floppy to test your driver   :t
if it hangs, you can still boot the hard drive
Title: Re: DOS driver tutorial
Post by: Gunther on June 16, 2014, 06:04:26 AM
Dave,

Quote from: dedndave on June 16, 2014, 04:32:55 AM
boot from a floppy to test your driver   :t
if it hangs, you can still boot the hard drive

that's my plan.

Gunther