home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / os / os2 / programm / 4761 < prev    next >
Encoding:
Internet Message Format  |  1992-09-07  |  1.3 KB

  1. Path: sparky!uunet!cs.utexas.edu!sun-barr!olivea!hal.com!decwrl!csus.edu!netcom.com!feustel
  2. From: feustel@netcom.com (David Feustel)
  3. Newsgroups: comp.os.os2.programmer
  4. Subject: Re: OS2 Device Driver in C -- Linking Problem
  5. Message-ID: <#rnn01r.feustel@netcom.com>
  6. Date: 5 Sep 92 14:53:44 GMT
  7. References: <1992Sep3.222735.22713@hns.com>
  8. Organization: DAFCO: OS/2 Software Support & Consulting
  9. Lines: 21
  10.  
  11. oneil@hns.com (Pat O'Neil) writes:
  12.  
  13. >Anyone out there have any experience writing OS/2 drivers in C?
  14.  
  15. >I am writing a 16-bit OS/2 device driver in C/2. I'm having trouble
  16. >getting the linker to put the data segment (which contains the
  17. >device header) first. The C/2 manual says that the linker
  18. >locates segments in the order it encounters them. This seems
  19. >true until I start bringing in the C run-time libraries
  20. >(which I need for sprintf, strtok, memcpy, etc.). If I link
  21. >without the library (and thereby get a zillion unresolveds)
  22. >the map at least says that the data segment is first.
  23.  
  24. Pat,
  25. The solution to yor problem is a small assembly language stub. See
  26. Mastrianni's book "Writing OS/2 2.0 Drivers in C" (Van Nostrand
  27. Reinhold, ISBN 0-442-01141-5). VNR has an 800 order number.
  28. -- 
  29. Dave Feustel N9MYI <feustel@netcom.com>
  30.  
  31. ( New .sig under construction. Watch this space! )
  32.