Author Topic: IS it always segmented memory management????????  (Read 3512 times)

hopyshopy

  • Guest
IS it always segmented memory management????????
« on: September 26, 2012, 03:44:35 AM »
Make my concept clear .........  ;)

In 8086 the address is 20 bits and it mapped to 16 bit register calculating effective physical address that is physical address = segment * 10h + offset
it seems to me that in 32 bit machine and even 64 bit machine ..... in the behind scene always segmented memory management is working?? means in 64 bit and 32 bit,  the registers SS,CS, DS , ES, FS , GS, working??????????

Thanks  8) 

Gunther

  • Member
  • *****
  • Posts: 3585
  • Forgive your enemies, but never forget their names
Re: IS it always segmented memory management????????
« Reply #1 on: September 26, 2012, 05:55:30 AM »
Hi hopyshopy,

means in 64 bit and 32 bit,  the registers SS,CS, DS , ES, FS , GS, working??????????

In a 32 bit operating system (Protected Mode) the segment registers contain selectors; that is a pointer into a descriptor which holds the information about the segment (size, granularity etc). In 64 bit (Long Mode) the segment registers haven't functionality. All things considered: under 32 and 64 bit there is another approach, very different from Real Mode DOS.

Gunther
Get your facts first, and then you can distort them.

hutch--

  • Administrator
  • Member
  • ******
  • Posts: 6715
  • Mnemonic Driven API Grinder
    • The MASM32 SDK
Re: IS it always segmented memory management????????
« Reply #2 on: September 27, 2012, 04:08:49 PM »
It has to do with the range of a given register size, 64k for 16 bit, 4 gig for 32 bit and heaps bigger again for 64 bit. Currently 64 bit PC machines only address a small fraction of the 64 bit range of numbers, from memory 64 bit Windows can handle about 128 gig of address space.

64k was a pain and to get around it, you selected the segment then set an offset from the segment address. 4 gig was a useful address range and it is only in the last few years that larger address range has been required. 4 gig allowed a single linear addressing scheme and 64 bit allows a far larger address range again, its just that computer hardware has not caught up with the extra address range yet.

In coding terms, 32 and 64 bit use the FLAT memory model, IE: a single offset from a starting address and that made addressing and memory management far simpler and faster.
hutch at movsd dot com
http://www.masm32.com    :biggrin:  :skrewy:

goofprog

  • Guest
Re: IS it always segmented memory management????????
« Reply #3 on: September 15, 2013, 07:43:28 PM »
Make my concept clear .........  ;)

In 8086 the address is 20 bits and it mapped to 16 bit register calculating effective physical address that is physical address = segment * 10h + offset
it seems to me that in 32 bit machine and even 64 bit machine ..... in the behind scene always segmented memory management is working?? means in 64 bit and 32 bit,  the registers SS,CS, DS , ES, FS , GS, working??????????

Thanks  8)
physical address = segment * 10h + offset
sounds like you are working in protected mode.
I don't understand it myself but 32bit mode doesn't really care about using segment registers for addressing.
like [es:ebx] is not needed. just xor ebx,ebx; mov bx,es; add ebx, offset. mov eax, [ebx] or whatever you want to do.