Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Creating DOS drivers?

945 views
Skip to first unread message

Harry Potter

unread,
Feb 14, 2016, 5:15:26 PM2/14/16
to
Hi! I'm looking on creating .SYS device drivers for DOS to be loaded from config.sys, mainly drives. Where can I find the necessary information?

Wildman

unread,
Feb 14, 2016, 6:09:52 PM2/14/16
to
This could be a good place to start...

http://www.drdobbs.com/writing-ms-dos-device-drivers/184402277

--
<Wildman> GNU/Linux user #557453
"Philosophy is common sense with big words."
-James Madison

Geoff Barnard

unread,
Feb 14, 2016, 6:19:18 PM2/14/16
to

"Harry Potter" <rose.j...@yahoo.com> wrote in message
news:ace50a4b-6c69-463e...@googlegroups.com...
> Hi! I'm looking on creating .SYS device drivers for DOS to be loaded from
> config.sys, mainly drives. Where can I find the necessary information?

I have a book!

Check 'Advanced MSDOS', by Ray Duncan. Microsoft Press

There is a substantial section in that about writing Installable Device
Drivers, including an ASM template for a driver, and discussion about where
such a driver would sit in memory.

I've always understood that the general idea is that the driver would locate
itself to somewhere safe in memory, and then latch into an appropriate IRQ,
or into a relevant BDOS jump

Geoff Barnard


Rod Pemberton

unread,
Feb 14, 2016, 11:07:13 PM2/14/16
to
I'm re-posting some links from my post a year or so ago to
a similar someone supposedly also named Harry Potter ... ;-)


IBM Disk Operating System Version 4.00 Technical Reference
"Chapter 11. Writing an Installable Device Driver"
http://bitsavers.trailing-edge.com/pdf/ibm/pc/dos/15F0256_DOS_4.0_Technical_Reference_Jul88.pdf

PC DOS 7 Technical Update
"Chapter 8. Writing an Installable Device Driver"
http://web.archive.org/web/20060515000000*/http://www.redbooks.ibm.com/redbooks/pdfs/gg244459.pdf

"DOS Device Drivers: A Debugging Utility and Definition"
Stephen A Rodgers, Programmers Journal, Nov. 1988, pg 46-52
http://www.unz.org/Pub/ProgrammersJournal-1988nov-00046

DR-DOS System and Programmer's Guide Device Driver.htm
"Chapter 6 Device Drivers"
http://www.drdos.net/documentation/sysprog/chap6.htm

Writing MS-DOS Device Drivers by Marcus Johnson, DDJ, Dec 1990
http://www.drdobbs.com/writing-ms-dos-device-drivers/184402277


I've updated the one link that was no longer valid in
the original post. The original post also has some links
to installable filesystems and sources for various technical
manuals.

https://groups.google.com/d/msg/comp.os.msdos.programmer/M-JJ5Z7igBQ/-safBm2vsigJ
Usenet Message-ID <op.xped0zogmk81un@localhost>


Rod Pemberton


Harry Potter

unread,
Feb 15, 2016, 6:19:56 AM2/15/16
to
I thank all of you for your information. :)

Bill Cunningham

unread,
Feb 19, 2016, 3:05:50 PM2/19/16
to

"Wildman" <best...@yahoo.com> wrote in message
news:Z7ydnZFyCfqilFzL...@giganews.com...
> On Sun, 14 Feb 2016 14:15:25 -0800, Harry Potter wrote:
>
>> Hi! I'm looking on creating .SYS device drivers for
>> DOS to be loaded from config.sys, mainly drives.
>> Where can I find the necessary information?
>
> This could be a good place to start...
>
> http://www.drdobbs.com/writing-ms-dos-device-drivers/184402277

IDK. MSDOS in C? I would think it would be easier and produce smaller
binaries for sure just using nasm. It's simple assembly. Not really
complicated. Of course when nasm assembles your still going to have header
code in there. I suppose there would be a way to get a flat binary. When I
think of C I think of modern processors. 16 and certainly 8 bit assembly IMO
would be simple. And call the DOS API.

Bill


Steve

unread,
Feb 20, 2016, 8:10:20 AM2/20/16
to
Hi Bill,

"Bill Cunningham" <nos...@nspam.invalid> writes:
> IDK. MSDOS in C? I would think it would be easier and produce smaller
>binaries for sure just using nasm. It's simple assembly. Not really
>complicated. Of course when nasm assembles your still going to have header
>code in there. I suppose there would be a way to get a flat binary. When I
>think of C I think of modern processors. 16 and certainly 8 bit assembly IMO
>would be simple. And call the DOS API.

*.EXE DOS programs have a header in the file. *.COM programs are a
pure binary format with no header.

Regards,

Steve N.

JJ

unread,
Feb 21, 2016, 6:52:49 AM2/21/16
to
Device drivers can be an EXE too, like EMM386.EXE.

I wrote this simple EXE-SYS hybrid program a long time ago.

http://pastebin.com/w2Dh5SNZ

For C, if there's a way to specify the starting offset of a code segment
(and also the segment order), it might be possible.
0 new messages