News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests

Main Menu

IS it always segmented memory management????????

Started by hopyshopy, September 26, 2012, 03:44:35 AM

Previous topic - Next topic

hopyshopy

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

Hi hopyshopy,

Quote from: hopyshopy on September 26, 2012, 03:44:35 AM
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
You have to know the facts before you can distort them.

hutch--

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.

goofprog

Quote from: hopyshopy 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)
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.