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

DOS, pointers & flat addressing Question

0 views
Skip to first unread message

Stan Brown

unread,
Feb 23, 1993, 6:14:03 AM2/23/93
to
In article <uN6cZB2w163w@bowdenj> bow...@infoserv.com (Jay C. Bowden) writes:
>I am hoping to develop a better understanding of pointers in
>the ever expanding universe (Windows, OS2, etc.) so I hope someone
>can answer a few questions, or point me to the answers.

Followups are redirected to comp.os.ms-windows.programmer.misc.

>1) Using pointers that are represented in SEG:OFS form, we are
> forever limited to linearly addressing only 1M byte, right?

No. In "real mode" the real address is (SEG<<4)+OFS; thus to all
intents and purposes you have a 20-bit address space, which is 1 MB.
(To be absolutely accurate, it's 0x00000 to 0xFFFF0+0x0FFFF, which is
about 1MB + 64 KB.)

But other ways of combining two 16-bit quantities give you a bigger
address space. In particular, the obvious (SEG<<16)+OFS gives you a
32-bit space, providing 4 GB. Windows programming wizards can give you
a better handle on the details than I.

>If there is a more appropriate place to post these questions, let
>me know! Thanks!

See the "followup-to" line.
--
Stan Brown, Oak Road Systems br...@Ncoast.ORG
"'Overreacting' seems to be the new word for being upset when someone treats
you badly. As such, it is serving as the second round of ammunition for
bullies who find that their first round hits the target." --Miss Manners

0 new messages