Article View: comp.os.msdos.programmer
Article #164Re: BC++ far* default in medium model
From: Paul Penrod
Date: Thu, 05 Nov 1992 03:15
Date: Thu, 05 Nov 1992 03:15
36 lines
2120 bytes
2120 bytes
In article <1992Nov4.090359.21666@hellgate.utah.edu> msmith%peruvian.utah.edu@cs.utah.edu writes:
>In article <18052@ksr.com>, kenyee@sneakers (Ken Yee) writes:
>|> Is there any way to make Borland C default all pointers to far
>|> in the medium model? I know this is the default in the *large*
>|> model but I want to do it with the *medium* model.
>|>
>|> thanks,
>|>
>|> ken
>
>Just compile with the large model then. The only difference between the two models
>is that all data is considered near in the medium model, and it's considered to be
>far in the large model. That's really the only difference, and it sounds like what
>you want.
>
>--
Almost right, but you forgot something.
In your data declarations, if you do not specifically specify the
keyword far, then the declaration is left in the default data
segment, which can be a problem if you have more than 64k of global
data. Granted, DS is referenced by a far pointer, but you are still
limited to 64k per data segment, eventhough you can reference upto
1 megabyte of data and 1 meg of code. This is because the far
pointers in the LARGE model are not normalized 32 bit, but
segment:offset 20 bit pointers.
...Paul
--
--------------------------------------------------------------------
Bureaucracy: noun, plural - Bureaucracies.
The process of turning energy into solid waste.
---------------------------------------------------------------------
Technical Details
Message-ID:
<1992Nov5.031544.5264@sequent.com>Path:
arc1-ca.pugleaf.net!sparky!uunet!charon.amdahl.com!pacbell.com!decwrl!spool.mu.edu!uwm.edu!ogicse!sequent!muncher.sequent.com!furballsReferences:
<18052@ksr.com> <1992Nov4.090359.21666@hellgate.utah.edu>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!charon.amdahl.com!pacbell.com!decwrl!spool.mu.edu!uwm.edu!ogicse!sequent!muncher.sequent.com!furballs From: furballs@sequent.com (Paul Penrod) Newsgroups: comp.os.msdos.programmer,comp.msdos.programmer,comp.os.ms-windows.programmer.tools Subject: Re: BC++ far* default in medium model Message-ID: <1992Nov5.031544.5264@sequent.com> Date: 5 Nov 92 03:15:44 GMT Article-I.D.: sequent.1992Nov5.031544.5264 References: <18052@ksr.com> <1992Nov4.090359.21666@hellgate.utah.edu> Sender: usenet@sequent.com (usenet ) Organization: Sequent Computer Systems Inc. Lines: 36 Nntp-Posting-Host: crg8.sequent.com