Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can I find the absolute memory address of 3E2:23? 3

Status
Not open for further replies.

caplan8293

Programmer
Sep 13, 2000
7
US
Hi, if I have something like 3E2:23, how do I find the absolute memory address of it? Please tell me how to do it, not just what the answer is.. Thanks so much!
Chuck [sig][/sig]
 
I'll do even better than "not" tell you the answer. I'll give you a hint and you will be able to calculate it for the rest of your life.

The numbers to the left of the colon represent the memory segment in paragraphs. Memory paragraphs are 10h (16 decimal) bytes in length. The numbers to the right represent the offset in the given memory segment.

Is that unclear enough or should I really try to confuse you?

My compliments to anybody who prefers to find an answer using their own resources, rather than having an answer handed to them!
[sig]<p> <br><a href=mailto: > </a><br><a href= plain black box</a><br>Don't sit down. It's time to dig another one.[/sig]
 
Sorry, I understand what you are saying (sort of) but I am a complete beginner... Any other hints? Thanks, I appreciate it.
Chuck [sig][/sig]
 
Sorry, that may have seemed a little misleading. Get out your handy-dandy hexadecimal calculator and multiply FFFFh by 10h. The answer, of course, is FFFF0h. Convert that number to decimal and you will discover the reason behind the low-memory constraints of IBM compatible PCs. FFFFh paragraphs, consisting of 10h bytes each, amount to exactly one megabyte.
[sig]<p> <br><a href=mailto: > </a><br><a href= plain black box</a><br>Don't sit down. It's time to dig another one.[/sig]
 
So is the absolute memory address of 3E2:23 3E20 + 23?
I would assume that both numbers are in hex so is the answer 3E43H? Please let me know and thanks for your help :)

Chuck [sig][/sig]
 
Nice one Caplan8293! You found the easy way. Shift the segment one place to the left and add the offset to get the absolute address.

Answers are meaningless unless we use them to find new answers to new problems. My compliments.
[sig]<p> <br><a href=mailto: > </a><br><a href= plain black box</a><br>Don't sit down. It's time to dig another one.[/sig]
 
Thanks Alt255, I really appreciate your help.
Chuck [sig][/sig]
 
Hello,

The answer given is probably allright, although it only is right for X86 processors in real mode. For the same processor in protected mode for instance, you will never be able to do it like this just from knowing a single address, and not the memory layout.

[sig]<p>Wouter Dijkslag<br><a href=mailto: > </a><br><a href= My site</a><br> [/sig]
 
Windows introduces seven layers of mystery to any &quot;simple&quot; solution. Generally, the contents of the first meg are fairly predictable. Although the given formula is the &quot;only&quot; way to calculate an absolute address... only in our wildest dreams would we presume to assume that the contents of any absolute address would remain stable from moment to moment.

By virtue of its nature, Windows must perform some fancy footwork to stay alive. The 32kb of memory that follow B800:0000 appear to be fairly stable (mostly unused) under Windows. Can anybody think of a reason why Bill Gates shouldn't pitch a tent and stake a claim to this area of memory?

Thank the sky above that Microsoft has declined to buy the only real-estate that truly belongs to the computer user.
[sig]<p> <br><a href=mailto: > </a><br><a href= plain black box</a><br>Don't sit down. It's time to dig another one.[/sig]
 
I must agree with Wody: in protected mode the 80386 (or higher) can adress 4G of memory, using a paging system even 64T (64 terabyte). An operating system working in Protected Mode (PM) (like Windows) can assign each program a segment (from 1 byte up to 4G). Using privilege parameters, this program can be totaly &quot;protected&quot; from other programs (i.e. it will think it is loaded in the 640K DOS conventional memory and calls to interrupts and other system routines will be redirected by the OS to the real memory adresses).

Also, the 3E2:23 memory adress example will have a totally different explanation in PM: 3E2 points to a descriptor in either the Global Descriptor Table (GDT), a Local Descriptor Table (LDT) or the Interrupt Descriptor Table (IDT); 23 will remain the offset. All those descriptor tables contain a linear adress to the start of a segment; the size of the segment (1 byte to 4G) and the access rights (privilege levels).

I advise you to read &quot;The 80x86 Family: Design, Programming and Interfacing&quot; by John Uffenbeck (Pub: Prentice-Hall Inc.)

Regards, [sig]<p>Bert Vingerhoets<br><a href=mailto:vingerhoetsbert@hotmail.com>vingerhoetsbert@hotmail.com</a><br><a href= worry what people think about you. They're too busy wondering what you think about them.[/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top