[comp.os.msdos.programmer] How to make device drivers

dalgic@Neon.Stanford.EDU (Ismail Dalgic) (02/15/91)

Hi,

This is probably a very trivial question, but I'm not an MSDOS
programmer.  I just found a public domain device driver source in
assembly language.  Could you tell me how to assemble this thing to
create a device driver with a .sys extension?  I have an XT compatible
with masm, if that matters.

Thanks a lot,

--Ismail Dalgic
dalgic@cs.stanford.edu

glratt@uncle-bens.rice.edu (Glenn Forbes Larratt) (02/15/91)

In article <1991Feb15.021901.13855@Neon.Stanford.EDU> dalgic@Neon.Stanford.EDU (Ismail Dalgic) writes:
>This is probably a very trivial question, but I'm not an MSDOS
>programmer.  I just found a public domain device driver source in
>assembly language.  Could you tell me how to assemble this thing to
>create a device driver with a .sys extension?  I have an XT compatible
>with masm, if that matters.
>
Use MASM to assemble it to .EXE format, then use EXE2BIN (DOS external)
to convert it to a binary file, explicitly giving it the extension .SYS.

Hope this helps.

--
	Glenn Larratt			glratt@uncle-bens.rice.edu
	Computing Resource Center	OCIS, Rice University, Houston, Texas

dubner@hpspkla.spk.hp.com (Joe Dubner) (02/15/91)

>              I just found a public domain device driver source in
> assembly language.  Could you tell me how to assemble this thing to
> create a device driver with a .sys extension?  

In a nutshell, a device driver is similar to a .COM file but the ORG is
at 0h instead of 0100h.  So after you compile and link it, pass it
through EXE2COM (freeware) or EXE2BIN (comes with some versions of
MS-DOS), and rename the resultant binary file with a .SYS extension.

... Joe

--------------------------------------------------------------------------
Joe Dubner     K7JD  |  Hewlett Packard Company  |  dubner@hpspkla.HP.COM
                     |  TAFC-34         M.S. 2I  |   (509) 921-3514 
                     |  Spokane, WA  99220       |
--------------------------------------------------------------------------