Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How can I convert 32bit linear pointer to 16bit Seg:Offs one to pass to Dos16.. functions?

2 views
Skip to first unread message

Alexey Smirnov

unread,
Nov 17, 1999, 3:00:00 AM11/17/99
to
Hi!
I am an russian programmer who wrote a SysInfo/2 PM utility
(ftp://hobbes.nmsu.edu/pub/os2/util/system/sysinfo0038.zip).
Now I want to solve a problem with calling any Dos16 functions from
my PM programm. The matter is that I use SpeedSoft Siby to craete a
SysInfo/2, so I cant call Dos16 functions natively (without a pointer
conversion). That is why I ask you to help me wrote a function that will
do such conversion. May be, I can find that function (or, macro) in
Watcom CPP ?

Best regards, Alexey Smirnov.


Lorne Sunley

unread,
Nov 17, 1999, 3:00:00 AM11/17/99
to

There are a number of 32 to 16 bit address conversion
functions in the "devhelp" group.

You may have to download the device driver development
kit from http://service.software.ibm.com/ddk/ to get the
headers that you need.

Lorne Sunley

Scott E. Garfinkle

unread,
Nov 17, 1999, 3:00:00 AM11/17/99
to
On Wed, 17 Nov 1999 15:35:06 GMT, Lorne Sunley wrote:

>There are a number of 32 to 16 bit address conversion
>functions in the "devhelp" group.

Yes. Use them! Also, if you're programming for Aurora (or Warp 4 FP13+) you
can use the KEE functions, too. See Holger Veit's web page. DON'T just
assume that you can do some "quick and dirty" translation from 16:16<->32 bit
addresses, since this fails with packed code selectors.

Peter Fitzsimons

unread,
Nov 17, 1999, 3:00:00 AM11/17/99
to
Alexey Smirnov wrote:
>
> Hi!
> I am an russian programmer who wrote a SysInfo/2 PM utility
> (ftp://hobbes.nmsu.edu/pub/os2/util/system/sysinfo0038.zip).
> Now I want to solve a problem with calling any Dos16 functions from
> my PM programm. The matter is that I use SpeedSoft Siby to craete a
> SysInfo/2, so I cant call Dos16 functions natively (without a pointer
> conversion). That is why I ask you to help me wrote a function that will
> do such conversion. May be, I can find that function (or, macro) in
> Watcom CPP ?
>

Watcom (with a few bugs, which version are you using?) will do the
translations automatically if you prototype the 16 bit functions
properly (ie: with _Far16).

Can you give a code example of something that is failing?

0 new messages