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