watcom 11 question 
Author Message
 watcom 11 question

I recently upgrade to watcom 11, and I'm programming in 32 protected
mode, my question is why is MK_FP(selector,0) always returning 0 ?



Wed, 08 Mar 2000 03:00:00 GMT  
 watcom 11 question

Quote:

>I recently upgrade to watcom 11, and I'm programming in 32 protected
>mode, my question is why is MK_FP(selector,0) always returning 0 ?

Too bad Watcom's technical support lines are down.  Must be a storm or martian
 attack or something.   If your segment (selector) is zero, I should not be
 surprised, since your offset is zero.

BTW,
your question has very, very little to do with the C language.  One of the
 MS-DOS or OS/2 or Windows newsgroups would be far more appropriate.

I'm at home, so I say anything I please.



Sun, 19 Mar 2000 03:00:00 GMT  
 watcom 11 question

Quote:


> >I recently upgrade to watcom 11, and I'm programming in 32 protected
> >mode, my question is why is MK_FP(selector,0) always returning 0 ?
> Too bad Watcom's technical support lines are down.  Must be a storm or martian
>  attack or something.   If your segment (selector) is zero, I should not be
>  surprised, since your offset is zero.
> BTW, your question has very, very little to do with the C language.  One of the
>  MS-DOS or OS/2 or Windows newsgroups would be far more appropriate.

This has GOT to be the stupid question of the week.

Note: When programming in 32 bit protected mode you are using a *flat*
memory model, there are NO segments and there are NO offsets.
Consequently, you should NOT be using the MK_FP macro at all.  Hey, you
can go back to programming in ANSI C.

Note: Selector would be a 32 bit pointer to begin with.

--
************************************************

*    Remove the _JUNK_ when replying to me.    *
************************************************
My programming is Wobbly.
It's good programming but it Wobbles,
and the statements sometimes get in the wrong places.
************************************************
You can't use void main() I have a patent on it!



Mon, 20 Mar 2000 03:00:00 GMT  
 watcom 11 question

Quote:



> > >I recently upgrade to watcom 11, and I'm programming in 32 protected
> > >mode, my question is why is MK_FP(selector,0) always returning 0 ?

> > Too bad Watcom's technical support lines are down.  Must be a storm or martian
> >  attack or something.   If your segment (selector) is zero, I should not be
> >  surprised, since your offset is zero.

> > BTW, your question has very, very little to do with the C language.  One of the
> >  MS-DOS or OS/2 or Windows newsgroups would be far more appropriate.

> This has GOT to be the stupid question of the week.

> Note: When programming in 32 bit protected mode you are using a *flat*
> memory model, there are NO segments and there are NO offsets.
> Consequently, you should NOT be using the MK_FP macro at all.  Hey, you
> can go back to programming in ANSI C.

Ummm, if I remember it correctly, you are wrong. Protected mode means
that the selector definition in the descriptor table decides where
the memory for the adress is. This means that you *CAN* set up a
flat memory model, but must not. You can set up as many 64K selectors
as you want to torture yourself with.

What I'm trying to say is that protected mode does not automatically
give you a flat memory model. But it allows you to set one up, if
you manage to supply a correct descriptor table.

Stephan
(initiator of the campaign against grumpiness in c.l.c)



Fri, 24 Mar 2000 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Watcom C++ V 11 - RTTI

2. Watcom C/C++ v.11 available

3. Porting code from Watcom C++ 11.0a

4. Converting from Watcom 11.0a

5. Keep Surfing Safe !111111!!!1!!!!!!!!!1!!1|1!11!11 6521

6. C compiler for PDP-11 (RSX-11 M+)

7. Herbert Schildt 11/11

8. Why PASCAL ??? 11/11

9. bc++ 5.0 <-> watcom 11.0

10. Creating a stub with Watcom C/C++ 11.0

11. Help getting Watcom 11.0 floating point emulation working in non-DOS environment

12. Watcom 11.0

 

 
Powered by phpBB® Forum Software