Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > Re: 16:32 far pointers in OpenWatcom C/C++

Reply
Thread Tools

Re: 16:32 far pointers in OpenWatcom C/C++

 
 
Jonathan de Boyne Pollard
Guest
Posts: n/a
 
      03-22-2010
>
>
> I believe the Watcom 32 bit compilers can (or could, maybe removed by
> now) large model (16 bit selector, 32 bit offset) code.
>

OpenWatcom version 1.9 is currently at its first release candidate.
16:32 far pointer support is, to the best of my knowledge, still there.
There's no reason to remove it. Indeed, the far pointer capabilities of
the compiler have been worked on by the developers for this release.
(Initialization of 16:16 far pointers with static storage duraction has
been improved. See the release notes for details.)

> It might be that OS/2 know what to do with that, I don't believe any
> other OS does.
>

One tends to use that sort of thing for systems programming, rather than
applications programming. In the case of OS/2, for example, there's not
much scope for using 16:32 far pointers in applications code, which is
almost always the Tiny model for 32-bit programs, but in kernel mode
code there are at least a couple of 32-bit segments that one might want
to work with using far pointers.

 
Reply With Quote
 
 
 
 
Ian Collins
Guest
Posts: n/a
 
      03-22-2010
On 03/22/10 10:56 PM, Jonathan de Boyne Pollard wrote:

Please stop this asinine cross posting.

--
Ian Collins
 
Reply With Quote
 
 
 
 
Kenny McCormack
Guest
Posts: n/a
 
      03-22-2010
In article <(E-Mail Removed)>,
Ian Collins <(E-Mail Removed)> wrote:
>On 03/22/10 10:56 PM, Jonathan de Boyne Pollard wrote:
>
>Please stop this asinine cross posting.


(Reading in comp.lang.c, the funniest and most entertaining newsgroup on
the Usenet)

Yes, I was just about to ask where the CLC topicality police were hiding
out and why they were ignoring this thread. I was about to make the
usual comment about the double standard - how only the newbies get
pounded on for being "OT".

Thanks Ian - you've restored my faith in (what passes for ... in CLC)
humanity.

--
(This discussion group is about C, ...)

Wrong. It is only OCCASIONALLY a discussion group
about C; mostly, like most "discussion" groups, it is
off-topic Rorsharch revelations of the childhood
traumas of the participants...

 
Reply With Quote
 
Jonathan de Boyne Pollard
Guest
Posts: n/a
 
      03-22-2010
>
>
> Yes, I was just about to ask where the CLC topicality police were
> hiding out and why they were ignoring this thread.
>

Yes. Heaven forbid that the world should discuss a C compiler and the C
language in newsgroups relevant to that compiler and the C language!
Emily PostNews would have a fit. I'm not sure how Ian Collins expects
the rest of us to stop his so-called "asinine" cross-posting for him,
though.

Returning to what we were talking about before the silly diversion, I
should point out that 32-bit applications programming where the target
is extended DOS or 32-bit Win16 (with OpenWatcom's extender) will also
occasionally employ 16:32 far pointers of course. But as I said before,
regular 32-bit OS/2 or Win32 applications programming generally does
not, since those both use the Tiny memory model, and 16:32 far pointers
are generally confined to the realms of systems programming on the
relevant operating systems. (Systems programming on Windows NT usually
will not involve them, since the gory details of specialized I/O and
memory accesses are abstracted away within C/C++ macros and library
functions for systems programmers on Windows NT. But systems
programming on DOS-Windows 9x/ME and OS/2 may well.)

 
Reply With Quote
 
Peter Flass
Guest
Posts: n/a
 
      03-23-2010
Jonathan de Boyne Pollard wrote:
>
> Returning to what we were talking about before the silly diversion, I
> should point out that 32-bit applications programming where the target
> is extended DOS or 32-bit Win16 (with OpenWatcom's extender) will also
> occasionally employ 16:32 far pointers of course. But as I said before,
> regular 32-bit OS/2 or Win32 applications programming generally does
> not, since those both use the Tiny memory model,


Flat memory model.
 
Reply With Quote
 
Ben Bacarisse
Guest
Posts: n/a
 
      03-23-2010
Branimir Maksimovic <(E-Mail Removed)> writes:

> On Tue, 23 Mar 2010 06:51:18 -0400
> Peter Flass <(E-Mail Removed)> wrote:
>
>> Jonathan de Boyne Pollard wrote:
>> >
>> > Returning to what we were talking about before the silly diversion,
>> > I should point out that 32-bit applications programming where the
>> > target is extended DOS or 32-bit Win16 (with OpenWatcom's extender)
>> > will also occasionally employ 16:32 far pointers of course. But as
>> > I said before, regular 32-bit OS/2 or Win32 applications
>> > programming generally does not, since those both use the Tiny
>> > memory model,

>>
>> Flat memory model.

>
> Problem with standard C and C++ is that they assume flat memory
> model.
> Eg pointer to char can have more than one type, in different
> addressing modes.


I think you mean: "The problem with standard C and C++ is that they
assume a single memory model. In contrast, hardware pointers come in
many forms in different addressing modes."

I don't usually comment on language but I kept re-reading what you
unable to work out what it was you were saying.

If this is what you did mean, then I agree and I have no other reason
to post! If you did mean that C assumes a flat memory model, then I'd
disagree.

<snip>
--
Ben.
 
Reply With Quote
 
Ben Bacarisse
Guest
Posts: n/a
 
      03-23-2010
Branimir Maksimovic <(E-Mail Removed)> writes:

> On Tue, 23 Mar 2010 12:09:27 +0000
> Ben Bacarisse <(E-Mail Removed)> wrote:

<snip>
> My English is not that good, thank you for explaining it .
>
>> I don't usually comment on language but I kept re-reading what you
>> unable to work out what it was you were saying.


Neither is mine, as I have just spotted by re-reading what I wrote!

[BTW I don't normally have any trouble understanding what you write.]

<snip>
--
Ben.
 
Reply With Quote
 
Jonathan de Boyne Pollard
Guest
Posts: n/a
 
      03-23-2010
>
>>
>> Returning to what we were talking about before the silly diversion, I
>> should point out that 32-bit applications programming where the
>> target is extended DOS or 32-bit Win16 (with OpenWatcom's extender)
>> will also occasionally employ 16:32 far pointers of course. But as I
>> said before, regular 32-bit OS/2 or Win32 applications programming
>> generally does not, since those both use the Tiny memory model, [...]
>>

> Flat memory model.
>

It's the same thing. Think about it. In the flat memory model
DS=ES=SS=CS (modulo the various required differences between code and
data segment descriptors) and all pointers are near. That's the
definition of the tiny memory model. The flat memory model is the tiny
memory model.

Since we are discussing OpenWatcom, I point to the OpenWatcom Users
Guide as one place where you can see this for yourself quite easily. In
the 16-bit Memory Models section, you'll find a Summary of 16-bit Memory
Models subsection, with a table. In the 32-bit Memory Models section,
you'll find a Summary of 32-bit Memory Models subsection, with a table.
Compare the tables in the twain, and you'll see that the row labelled
"tiny" in the former is labelled "flat" in the latter.

There's no real distinction between the twain (apart from some
implementation-specific pre-defined macros). 32-bit flat model
programming is 32-bit tiny model programming, and 16-bit tiny model
programming is 16-bit flat model programming. In all, near pointers to
automatic storage data, heap storage data, static storage data, and code
can be casted to one another without differences in assumed segment
registers causing problems. In all, the code generator doesn't emit
segment re-loads, or even segment overrides, when using the default
pointer sizes. In all, near forms of instructions are used.

 
Reply With Quote
 
Nick
Guest
Posts: n/a
 
      03-23-2010
Jonathan de Boyne Pollard <(E-Mail Removed)>
writes:

PLEASE! Don't cut all the attributions. I've seen you asked this more
than once in a different newsgroup in the last few days and you've
ignored the requests. Please listen to them.

>>
>>>


[content snipped]
--
Online waterways route planner | http://canalplan.eu
Plan trips, see photos, check facilities | http://canalplan.org.uk
 
Reply With Quote
 
Richard Bos
Guest
Posts: n/a
 
      03-23-2010
Ian Collins <(E-Mail Removed)> wrote:

> On 03/22/10 10:56 PM, Jonathan de Boyne Pollard wrote:
>
> Please stop this asinine cross posting.


That crossposting was, for once, not asinine. It served as a nice
example why, even now, Leenux weenies are not correct when they insist
that C has a flat memory model and all pointers are just numbers.

Richard
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
news://news.openwatcom.org doesn't respond Nickolai Leschov C Programming 0 09-18-2008 08:31 AM
Openwatcom C++ ,g3d graphics libraries& wxWidget rfasuma C++ 1 02-25-2008 02:40 PM
ToolTipText pop up far far away from mouse pointer RC Java 2 01-08-2008 12:54 AM
Taking table-less CSS design far too far Andy Dingley HTML 45 06-11-2006 07:14 PM
Howto access .RC/.RES Ressource files with portable C++ code ( BCC,MSVC,GNU-C++,OpenWatcom)? Rolf Hemmerling C++ 3 10-31-2003 07:03 PM



Advertisments