home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / os / os2 / programm / 4386 < prev    next >
Encoding:
Internet Message Format  |  1992-08-22  |  2.5 KB

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