home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky comp.os.os2.programmer:4386 comp.os.os2.apps:5473
- Path: sparky!uunet!elroy.jpl.nasa.gov!usc!zaphod.mps.ohio-state.edu!menudo.uh.edu!ccsvax.sfasu.edu!z_kupkams
- From: z_kupkams@ccsvax.sfasu.edu
- Newsgroups: comp.os.os2.programmer,comp.os.os2.apps
- Subject: Re: Writing Device Drivers for OS/2 2.0
- Message-ID: <1992Aug23.022305.646@ccsvax.sfasu.edu>
- Date: 23 Aug 92 02:23:05 CST
- References: <1992Aug21.151852.8673@natinst.com>
- Organization: Stephen F. Austin State University
- Lines: 47
-
- In article <1992Aug21.151852.8673@natinst.com>, ramdas@natinst.com (Malathi Ramdas) writes:
- >
- > I am in the process of writing an instrument control character based devcie
- > driver for OS/2 2.0. The device driver architecture under OS/2 2.0 is still
- > 16-bit. Does that mean that I need to generate 16-bit device driver code. (ie:
- > generate code using a 16-bit compiler and 16-bit linker).
-
- YES, You need to write a 16bit small model driver, remember that
- you have to write the driver skeleton/header in MASM (5.1 or 6.0 work for me)
-
- > Also, what would
- > be the address format of the data address in an IOCTL request packet passed by
- > the kernel on behalf of an application making a DosDevIOCtl API call to my
- > device driver? Would it be in a 16:16 (selector:offset) form or a 0:32
- > address form (flat address)? Would it depend on whether the application is
- > 16-bit or 32-bit? From what I read all 16-bit processes get tiled
- > into a flat virtual address space. I hope to hear that all virtual addresses
- > that gets passed to my driver is in a 0:32 bit form.
-
- Yes if you are writing a 32bit app using DevIOCtl calls to your driver, the
- addresses in the packets are virtual :32 addresses. Remember that you have
- to DevHlp Lock the application data buffer and convert it to a physical
- address if you are using DMA.
-
- > Is there a 32-bit assembler that goes out with OS/2 2.0. I still have the
- > masm assembler that is 16-bit. I have not received anything along with toolkit
- >
-
- MASM works fine, as a matter of fact 6.0 supports 32bit FLAT model. but since
- drivers are essentially 16bit small model, 5.1 should work for what you need.
-
- >
-
-
- Hope this Helps, I would highly recomend getting The IBM Docs: There have been
- a few changes to DevIOCtl ( new parameters ) for 32bit apps.
- You should have at a minumum 1) Control Program reference
- 2) Physical Device Driver Reference.
-
- I went through a lot a this working on a QIC-40/80 Driver, That we will be
- shipping with our Backup Program on October 31st.
-
-
- Good Luck
-
- Michael Kupka
-
-