home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / os / os2 / programm / 7309 < prev    next >
Encoding:
Text File  |  1993-01-04  |  1.4 KB  |  34 lines

  1. Newsgroups: comp.os.os2.programmer
  2. Path: sparky!uunet!mcsun!news.funet.fi!ajk.tele.fi!funic!nntp.hut.fi!nntp!thakulin
  3. From: thakulin@vipunen.hut.fi (Timo Tapio Hakulinen)
  4. Subject: Calling 16 bit APIs from 32 bit programs
  5. Message-ID: <THAKULIN.93Jan4202903@vipunen.hut.fi>
  6. Sender: usenet@nntp.hut.fi (Usenet pseudouser id)
  7. Nntp-Posting-Host: vipunen.hut.fi
  8. Organization: Helsinki University of Technology, Finland
  9. Distribution: comp
  10. Date: 4 Jan 93 20:29:03
  11. Lines: 21
  12.  
  13. I need to call OS/2 16 bit APIs from 32 bit C-code (GCC) and assembler
  14. routines, but this seems to be fairly tricky business.  It's possible to
  15. create a small assembler module to convert calling convention from the
  16. standard C-convention into the Pascal-type calling sequence required by the
  17. 16 bit APIs, but I'm having trouble with declaring the 16 bit and 32 bit
  18. code and data segments properly.  LINK386 keeps whining about this and that.
  19. I've got adequate documentation about 16 bit APIs but virtually nothing about
  20. 32 bit system programming in OS/2, so much of what I'm doing is based on
  21. guesswork and MASM 5.0 manual.  I wonder if anyone has a working chunk of
  22. code / other info demonstrating how to make 16 bit system calls from 32 bit
  23. segments and, more generally, how to perform cross-calling between 16 bit
  24. and 32 bit segments, possibly sharing data among functions.
  25.  
  26. Cheers,
  27.  
  28. Timo
  29. -----------
  30. Timo Hakulinen
  31. (thakulin@hila.hut.fi, thakulin@vipunen.hut.fi)
  32.  
  33.  
  34.