8086 Real Mode Addressing

M

mark_india

In 8086 real mode addressing the 16 bit segment register is added with
16 bit offset and 20 bit address is generated.
Eg:
Case 1:
********
Segment Reg: B230
Offset Reg: 2052

Now the resulting 20 bit address is generated as
Segment reg+ B230+
offset 02052
------------------
Address = B4352
The resulting address generated is accessed.

Case 2
******
Now my doubt is what if Segment Register: FFFF and offset register:
FFFF value
in it.If we calculate the Resulting 20 bit address it will cause an
overflow Right!!!!
Can somebody clarify how 20 bit address is generated in this case?????


Regds
PS
 
J

Jens.Toerring

mark_india said:
In 8086 real mode addressing the 16 bit segment register is added with
16 bit offset and 20 bit address is generated.
Eg:
Case 1:
********
Segment Reg: B230
Offset Reg: 2052
Now the resulting 20 bit address is generated as
Segment reg+ B230+
offset 02052
Case 2
******
Now my doubt is what if Segment Register: FFFF and offset register:
FFFF value
in it.If we calculate the Resulting 20 bit address it will cause an
overflow Right!!!!
Can somebody clarify how 20 bit address is generated in this case?????

Sorry, but what's your question about C? You probably better should
ask things like this in a hardware or embedded programming group.

Regards, Jens
 
G

Grumble

mark_india said:
In 8086 real mode addressing the 16 bit segment register is added with
16 bit offset and 20 bit address is generated.

Try comp.lang.asm.x86
 
B

Bob

e Resulting 20 bit address it will cause an
overflow Right!!!!
Can somebody clarify how 20 bit address is generated in this case?????

THIS is the infamous A20 tweak that annoyed our youth !!!

0xFFFF0 +
0x00010 =
binary : 100000000000000000000

Overflow ! So it normally accessed back from 0x0000 BUT, and
this is a big BUT, they used that line to access HMA (High Memory
Area) that is almost 64Kb (64Kb-16bytes) giving DOS some
additional space to load drivers thus freeing normal memory for
applications.

Good (Baaad) ol' days !
 
M

mark_india

In 8086 real mode addressing the 16 bit segment register is added with
16 bit offset and 20 bit address is generated.
Eg:
Case 1:
********
Segment Reg: B230
Offset Reg: 2052

Now the resulting 20 bit address is generated as
Segment reg+ B230+
offset 02052
------------------
Address = B4352
The resulting address generated is accessed.

Case 2
******
Now my doubt is what if Segment Register: FFFF and offset register:
FFFF value
in it.If we calculate the Resulting 20 bit address it will cause an
overflow Right!!!!
Can somebody clarify how 20 bit address is generated in this case?????


Regds
PS
Sorry for posting in this group, i did this because the
comp.lang.asm.86x says it is no longer archived, also C is used for
system programming. So i thought there might be people who know
something about it.
Bob thank you for your explanation, so you are saying that that it
actually overflows when added.
Iam still confused. I want to know whether it starts reading from the
starting address or it jumps to some High memory as Bob pointed
out.Can somebody clarify little more.
 
M

mark_india

Bob said:
THIS is the infamous A20 tweak that annoyed our youth !!!

0xFFFF0 +
0x00010 =
binary : 100000000000000000000

Overflow ! So it normally accessed back from 0x0000 BUT, and
this is a big BUT, they used that line to access HMA (High Memory
Area) that is almost 64Kb (64Kb-16bytes) giving DOS some
additional space to load drivers thus freeing normal memory for
applications.

Good (Baaad) ol' days !

Bob,
So that means processor finds an overflow when finding the address, it
jumps to a new 64kb block called HMA and starts addressing from
there????? So that means whenever it generates the overflowing address
it points to the HMA and whenever it generates normal address it will
be pointing to the normal memory ?
 
C

CBFalconer

mark_india said:
.... snip ...

Sorry for posting in this group, i did this because the
comp.lang.asm.86x says it is no longer archived, also C is used
for system programming. So i thought there might be people who
know something about it.

Go back there, getting a real newsreader and newserver if you
must. Newsgroups are independant of Google. The x86 addressing is
still OT here.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top